
[英]Configuring CORS for API Gateway in SAM/CloudFormation/Swagger
[英]Promote Canary Release for AWS API Gateway using SAM or CloudFormation
我正在使用 AWS SAM(无服务器应用程序模型)来定义 API。 定义 API 网关的部分如下:
...
TestApiGateway:
Type: AWS::Serverless::Api
Properties:
Name: test-api
StageName: Prod
TestApiGatewayDeployment:
Type: AWS::ApiGateway::Deployment
Properties:
DeploymentCanarySettings:
PercentTraffic: 30
Description: Canary deployment settings for API Gateway
RestApiId: !Ref TestApiGateway
StageName: Prod
...
如您所见,我正在尝试为 API 网关做金丝雀版本。 它按预期工作。 但是在 Canary Release 测试之后,我想将 Canary Release 推广到生产阶段。
我试图将PercentTraffic设置为 0
...
DeploymentCanarySettings:
PercentTraffic: 0
...
但它并没有促进金丝雀的发布。 而且我还尝试将AWS::Serverless::Api中的部署 ID 设置为金丝雀部署 ID。
TestApiGateway:
Type: AWS::Serverless::Api
Properties:
Name: test-api
StageName: Prod
CanarySetting:
DeploymentId: <the canary deployment id>
它仍然没有将部署更改为金丝雀部署。
我的问题是我需要在SAM模板或Cloudformation中做些什么才能促进发布? 谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.