1

I am using CloudFormation template that creates launch configuration and auto scaling group. User data script for this launch configuration calls CI web-hook to deploy application into this instance. Naturally web-hook responds with 200 immediately, but deployment process will take 2-3 minutes. If I call cfn-signal immediately, instance will register with load balancer too soon, so how can I postpone it? Ideally I think CI should signal if app deployment was successful or not.

0

1 Answer 1

1

If you want to trigger CloudFormation resource creation completion from a CI process outside of the launched EC2 instance without calling cfn-signal from the instance, you can just signal using the SignalResource API call, either directly or via any of the AWS SDKs (e.g., aws cloudformation signal-resource from the CLI, cloudformation.signalResource from the NodeJS SDK possibly via a Lambda function, etc.

Just make sure to use the instance ID that you are signaling as the 'unique ID'.

1
  • Perfect! Just what I was looking for.
    – arnaslu
    May 6, 2016 at 6:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .