feat(ecs): automatically create ec2InstanceProfile for ManagedInstancesCapacityProvider#35796
Conversation
bb91fda to
3d7853f
Compare
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
bdcd023 to
b14b39c
Compare
87f2a2d to
b5e9395
Compare
29791b6 to
61abd81
Compare
b6abb9a to
786bc73
Compare
|
You're correct that it still doesn't work with Ec2Service, which is why they are changing all the examples to use FargateService. |
|
Ah ok missed that info sorry ... It raise some questions about some |
|
Thank you @gael-ft. Would you mind creating a new feature request for the daemon service use case with ECS Managed Instances through a dedicated GitHub issue? |
|
@aemada-aws what’s blocking this from being merged? |
|
@isker Not sure if you noticed, but we were waiting for your response to this question: #35796 (comment) |
|
I don't know the answer to that question. I didn't write this PR. |
|
@isker Oh sorry, I misread the author. @aemada-aws can you answer the question for reference? |
c818e4d to
db2c5cc
Compare
|
|
||||||||||||||
|
|
||||||||||||||
|
Integ test is failing because deletion fails because of a separate issue: #36071 |
you are correct, this doesn't fix the issue of using the managed capacity provider with the ec2service construct. |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Merge Queue Status🚫 The pull request has left the queue (rule: This pull request spent 4 seconds in the queue, with no time running CI. ReasonThe pull request can't be updated
HintYou should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again. |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Merge Queue Status✅ The pull request has been merged at 0e880e8 This pull request spent 5 seconds in the queue, with no time running CI. Required conditions to merge
|
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Related to #35742
Reason for this change
The ManagedInstancesCapacityProvider construct was requiring users to pass
ec2InstanceProfile. This PR makes this optional and automatically creates one.Note that the role name must be prefixed with "ecsInstanceRole". This is a restriction from the managed policy on the infrastructure role https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonECSInfrastructureRolePolicyForManagedInstances.html
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/managed-instances-instance-profile.html
Description of changes
ec2InstanceProfile is now optional
Describe any new or updated permissions being added
AmazonECSInstanceRolePolicyForManagedInstances- AWS managed policy attached to the EC2 instance profile role that provides necessary permissions for ECS managed instances to register with ecs clusters, pull from ECR, send logs to CW and access ECS agent endpoint.Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license