0

The API tends to go down when I re-deploy a REST-API using AWS API-gateway and cloudformation (AWS::ApiGateway::RestApi). Then a manual "deploy of the API" through AWS-console is required to fix it. This creates downtime until I have done this. Which options do I have to prevent this?

Ref: https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-deploy-api.html

Peter
  • 5,556
  • 3
  • 23
  • 38

1 Answers1

0

In your CloudFormation template, be sure to include a AWS:ApiGateway:Deployment resource to trigger the actual deployment after a change.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-deployment.html

APIs are deployed without downtime. While the new configuration is propagated API Gateway responds to requests using the previous config. Once the new configuration is available and a new request comes in it will be handled using the updated configuration.

Sébastien Stormacq
  • 14,301
  • 5
  • 41
  • 64
  • I have this actually. I should probably update my question with my cloudformation template. – Peter Feb 04 '19 at 15:52
  • This answer is incorrect. See this [Stack Overflow question](https://stackoverflow.com/questions/41423439/cloudformation-doesnt-deploy-to-api-gateway-stages-on-update) for why it's not as simple as this answer suggests. – Krzysztof Czelusniak Jan 11 '20 at 20:15