3

I am having issue with one of my cloudformation sam template. In that template, i have a AWS::CloudFront::Distribution block, that takes more than 10 mins to complete.

It seems that the aws cloudformation deploy command just times out everytime its being run, it could be its default timeout. But how do i increase the timeout or somehow wait for the stack to be completed without exiting the cli command.

On the cloudformation web console, the stack gets completed though, its just that the cli exits before it actually gets completed.

Jeff
  • 760
  • 1
  • 12
  • 26

1 Answers1

3

This is a known issue with AWS CLI. stack-create-complete waits until stack status is CREATE_COMPLETE. It will poll every 5 seconds (Not 30!) until a successful state has been reached. This will exit with a return code of 255 after 120 failed checks.

It was fixed in here. https://github.com/aws/aws-cli/pull/2816

Udara Jayawardana
  • 1,073
  • 2
  • 14
  • 27
  • you mean i can use it like `aws cloudformation deploy stack-create-complete` ? – Jeff Apr 26 '18 at 04:43
  • Whats your aws version? Try upgrading the awscli and trying again. `pip install --upgrade awscli` – Udara Jayawardana Apr 26 '18 at 05:44
  • this is my aws cli version `aws-cli/1.11.126 Python/2.7.9 Windows/8 botocore/1.5.89` – Jeff Apr 26 '18 at 10:33
  • Upgrade the CLI and try again. It should fix the issue – Udara Jayawardana Apr 26 '18 at 10:36
  • did upgrade my awscli. what happened is my module dependencies got all messed up. my lambda functions throwing different sorts of errors after that. had to fix it all night till morning to get my module versions back. im good for now with the timeout i think, as long as my deployments will work. – Jeff Apr 27 '18 at 04:03
  • Sorry to hear that but glad everything is back to normal now. However, regarding the uodate, unfortunately that's the fix provided by aws – Udara Jayawardana Apr 27 '18 at 04:18
  • no problem, but the answer you gave was right, it just came with unexpected bugs though, hehe – Jeff Apr 27 '18 at 07:48
  • for the ones who will try to do upgrades, be careful not to mess up with your current installed pip modules. hope pip modules will require info on dependencies later on. right now, there arent any info on the modules' required dependencies, they should give it attention, like nuget – Jeff Apr 27 '18 at 07:51
  • And an informative question too. I'm working closely with AWS for a while now. I'll reach out to you if I get any update on this. Cheers – Udara Jayawardana Apr 27 '18 at 08:03