Home > OS >  How to set API Gateway Description in serverless.yml?
How to set API Gateway Description in serverless.yml?

Time:01-23

I'm trying to set the description to a REST API Gateway through serverless.yml, using serverless version 2.72.3

I couldn't find anything here enter image description here

CodePudding user response:

According to this guide, this setting for the description for the API Gateway stage deployment. Check your description in each of your stages

CodePudding user response:

You have to define ApiGatewayRestApi resource by your self (Ref), then you can add description.

provider:
  apiGateway:
    RestApiId:
      Ref: MyApiGateway
    RestApiRootResourceId:
      Fn::GetAtt:
        - MyApiGateway
        - RootResourceId

resources:
  Resources:
    MyApiGateway:
      Type: AWS::ApiGateway::RestApi
      Properties:
        Name: my-api-gateway
        Description: My api gateway description # Put your description

And remember to update provider to use your defined api gateway if you already config http event for some lambda functions

List of ApiGateway properties

  • Related