Change API Gateway Name when using Serverless Framework

Viewed 872

The Serverless framework has made it very easy for developers to create an API gateway connected to a lambda function. like this

hello:
  name: hello-handler
  description: blablabla
  handler: /lambda-functions/hello-handler.handler
  role: HelloRole
  package:
    include:
      - lambda-functions/hello-handler.js
  events:
    - http: GET hello

My question is how can I change the name of the API gateway that is going to be created?

1 Answers

Based on the doc, this should do the trick.

provider:
  ...
  apiName: custom-api-name # Use a custom name for the API Gateway API
Related