harleymckenzie/tf-codepipeline-website

Code not being deployed to newly provisioned instances

Opened this issue · 0 comments

There's an issue where if a new instance is created after initially creating the stack, it won't have any of the code or apache installed.

This is because a lifecycle hook on the ASG should send a message to an SQS queue to be picked up by CodeDeploy to deploy to the newly created instance(s). The lifecycle hook looks to automatically exist, but there is no SQS queue and I'm not sure how to configure CodeDeploy to read from this.

ref: https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html#integrations-aws-auto-scaling-behaviors-hook-usage