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

fix(ecs-patterns): integ test unable to create ECS service #29490

Merged
merged 3 commits into from Mar 21, 2024

Conversation

wafuwafu13
Copy link
Contributor

@wafuwafu13 wafuwafu13 commented Mar 14, 2024

Issue # (if applicable)

part of #29186 (comment)
same as #29333

Reason for this change

CFN stack gets stuck after yarn integ because of not being able to create ECS service.

AWS::ECS::Service | CREATE_IN_PROGRESS
$ aws ecs describe-tasks --cluster aws-ecs-integ-lb-fargate-cmd-entrypoint-xxx --tasks xxxxxxxxxxxxxxx | jq '.tasks[].stopCode'
"EssentialContainerExited"

Description of changes

Change taskImageOptions image, command, entryPoint and add security group.
Ref: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/example_task_definitions.html#example_task_definition-webserver

Description of how you validated changes

Pass integration tests

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team March 14, 2024 20:40
@github-actions github-actions bot added valued-contributor [Pilot] contributed between 6-12 PRs to the CDK p2 labels Mar 14, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Mar 14, 2024
@msambol
Copy link
Contributor

msambol commented Mar 20, 2024

@wafuwafu13 Could you change the title to fix(ecs-patterns): integ test unable to create ECS service ?

@wafuwafu13 wafuwafu13 changed the title fix(ecs-patterns): resolve not being able to create ECS service in integ.alb-fargate-service-command-entry-point fix(ecs-patterns): integ test unable to create ECS service Mar 20, 2024
@wafuwafu13
Copy link
Contributor Author

@msambol
I done it

Copy link
Contributor

@msambol msambol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you, @wafuwafu13.

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Mar 20, 2024
@godwingrs22 godwingrs22 self-requested a review March 20, 2024 23:20
Comment on lines 18 to 20
allowAllOutbound: true,
});
securityGroup.addIngressRule(ec2.Peer.anyIpv4(), ec2.Port.tcpRange(32768, 65535));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Could we restrict the inbound rules to allow only specific container port and also to deny all outbound traffic (allowAllOutbound: false) as I don't think it will be required for this usecase.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 91731b6
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Member

@godwingrs22 godwingrs22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for contributing.

Copy link
Contributor

mergify bot commented Mar 21, 2024

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).

@mergify mergify bot merged commit 6faa60e into aws:main Mar 21, 2024
10 checks passed
@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Mar 21, 2024
jun1-t pushed a commit to jun1-t/aws-cdk that referenced this pull request Mar 23, 2024
### Issue # (if applicable)

part of aws#29186 (comment)
same as aws#29333

### Reason for this change


CFN stack gets stuck after `yarn integ` because of not being able to create ECS service.

```
AWS::ECS::Service | CREATE_IN_PROGRESS
```

```
$ aws ecs describe-tasks --cluster aws-ecs-integ-lb-fargate-cmd-entrypoint-xxx --tasks xxxxxxxxxxxxxxx | jq '.tasks[].stopCode'
"EssentialContainerExited"
```

### Description of changes


Change `taskImageOptions` `image`, `command`, `entryPoint` and add security group.
Ref: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/example_task_definitions.html#example_task_definition-webserver

### Description of how you validated changes


Pass integration tests

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
ahammond pushed a commit to ahammond/aws-cdk that referenced this pull request Mar 26, 2024
### Issue # (if applicable)

part of aws#29186 (comment)
same as aws#29333

### Reason for this change


CFN stack gets stuck after `yarn integ` because of not being able to create ECS service.

```
AWS::ECS::Service | CREATE_IN_PROGRESS
```

```
$ aws ecs describe-tasks --cluster aws-ecs-integ-lb-fargate-cmd-entrypoint-xxx --tasks xxxxxxxxxxxxxxx | jq '.tasks[].stopCode'
"EssentialContainerExited"
```

### Description of changes


Change `taskImageOptions` `image`, `command`, `entryPoint` and add security group.
Ref: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/example_task_definitions.html#example_task_definition-webserver

### Description of how you validated changes


Pass integration tests

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2 valued-contributor [Pilot] contributed between 6-12 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants