繁体   English   中英

使用 SAM 或 CloudFormation 促进 AWS API 网关的金丝雀版本

[英]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.

 
粤ICP备18138465号  © 2020-2023 STACKOOM.COM