CloudFormation doesn't deploy to API gateway stages on update

后端 未结 8 1304
南笙
南笙 2020-12-25 11:47

When I run CloudFormation deploy using a template with API Gateway resources, the first time I run it, it creates and deploys to stages. The subsequent times I

8条回答
  •  悲哀的现实
    2020-12-25 12:19

    The answer here is to use the AutoDeploy property of the Stage:

      Stage:
        Type: AWS::ApiGatewayV2::Stage
        Properties:
          StageName: v1
          Description: 'API Version 1'
          ApiId: !Ref: myApi
          AutoDeploy: true
    

    Note that the 'DeploymentId' property must be unspecified when using 'AutoDeploy'.

    See documentation, here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigatewayv2-stage.html

提交回复
热议问题