Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change API Gateway Name when using Serverless Framework

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?

like image 961
joe Avatar asked Sep 07 '26 20:09

joe


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
like image 126
jellycsc Avatar answered Sep 12 '26 09:09

jellycsc