Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ecs: lifecycle hook needs a dependency on SNS publish role policy #1212

Closed
rix0rrr opened this issue Nov 19, 2018 · 0 comments · Fixed by #1218
Closed

ecs: lifecycle hook needs a dependency on SNS publish role policy #1212

rix0rrr opened this issue Nov 19, 2018 · 0 comments · Fixed by #1218
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container bug This issue is a bug.

Comments

@rix0rrr
Copy link
Contributor

rix0rrr commented Nov 19, 2018

During creation the lifecycle hook will write a test message to SNS, which might fail if the policy gets added later:

24/41 | 12:56:27 | CREATE_FAILED        | AWS::AutoScaling::LifecycleHook           | Cluster/DefaultAutoScalingGroup/LifecycleHookDrainHook (ClusterDefaultAutoScalingGroupLifecycleHookDrainHook4A9A4325) Unable to publish test message to notification target arn:aws:sns:us-east-1:209640446841:greeting-stack-ClusterDefaultAutoScalingGroupDrainECSHookTopicFF0E6CF4-1JFOXBKO9CQ1U using IAM role arn:aws:iam::209640446841:role/greeting-stack-ClusterDefaultAutoScalingGroupLifec-3SF76AMBEH5O. Please check your target and role configuration and try to put lifecycle hook again. (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError; Request ID: 6fc2dfc0-ec24-11e8-84a2-fb1b7f6a78f3)
@rix0rrr rix0rrr added bug This issue is a bug. @aws-cdk/aws-ecs Related to Amazon Elastic Container labels Nov 19, 2018
@rix0rrr rix0rrr changed the title ecs: lifecycle hook needs a dependency on SNS policy ecs: lifecycle hook needs a dependency on SNS publish role policy Nov 19, 2018
rix0rrr added a commit that referenced this issue Nov 20, 2018
Add an ordering dependency between the LifecycleHook and the role policy
that grants permissions to perform the action (publish to a topic or
queue).

Without this ordering dependency, the template might fail to deploy.

Fixes #1212.
rix0rrr added a commit that referenced this issue Nov 21, 2018
Add an ordering dependency between the LifecycleHook and the role policy
that grants permissions to perform the action (publish to a topic or
queue).

Without this ordering dependency, the template might fail to deploy.

Fixes #1212.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ecs Related to Amazon Elastic Container bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant