Serverless ApiGateway Only

Can I use Serverless framework to ONLY deploy an ApiGateway (V2, HTTP API) ?
If so, any specifics I should pay attention to?

The use case is the following:

  • I already have RestApi’s deployed in AWS with Serverless (so Lambda + ApiGatewayV1)
  • I now want to have an ApiGateway that sits in front, to route specific routes to specific lambda’s (so I’m using ‘integrations’ of ApiGatewayV2).
  • I would like to use Serverless Framework to deploy this ApiGatewayV2, which does not include any lambda’s, just the apigateway

I think you need to create another function in your serverless.yml, for example:

service: hello-world
    provider:
       name: aws
       runtime: nodejs12.x 
    functions:
      hello:
        handler: handler.hello
        events:
          - http: PUT v1/hello
      helloV2:
        handler: handler.hello
        events:
          - http: PUT v2/hello