-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(ecs-patterns): add listener port as a property for network/application load balanced services #4825
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
Conversation
…her than the default 80(fix #4793) - feat(ecs-patterns): public facing NLB fronted fargate tasks with assignPublicIp enabled should allow all ipv4 traffic to the ingress port on the fargate task
|
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
I disagree with this statement. I have multiple AWS services that are meant to be accessed only from inside a corporate VPN. It has public IPs because the traffic comes from outside the AWS account, but the access to the service behind the NLB is still restricted with a prefix list specifying the corporate IP block. I don't use the patterns helper functions, but if this change is accepted the configuration I support will be impossible to build because the assumption made is not globally true. I strongly encourage making any change that automatically reduces the security of a system for convenience explicitly opt-in. |
I'm in agreement here, I don't think the use-case you handle can be described as the general use-case. I would rather not reduce the security levels of the construct and would leave it up to the user to do it after the fact if they prefer. Since your PR is it's around allowing different listener ports (nlb/alb), please reduce the scope of this PR to only allow a listener port to be input to the construct and make any additional changes in a separate PR. |
packages/@aws-cdk/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-ecs-patterns/lib/fargate/network-load-balanced-fargate-service.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-ecs-patterns/lib/base/network-load-balanced-service-base.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-ecs-patterns/lib/base/network-load-balanced-service-base.ts
Show resolved
Hide resolved
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Pull request has been modified.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
- remove non-related logic to another PR
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts
Outdated
Show resolved
Hide resolved
packages/@aws-cdk/aws-ecs-patterns/lib/base/network-load-balanced-service-base.ts
Outdated
Show resolved
Hide resolved
Pull request has been modified.
Pull request has been modified.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Can you also add a unit test to test when you specify a different port? |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
✔ setting NLB special listener port to create the listener ✔ setting ALB special listener port to create the listener ✔ setting ALB HTTPS protocol to create the listener on 443 ✔ setting ALB HTTP protocol to create the listener on 80 ✔ setting ALB without any protocol or listenerPort to create the listener on 80
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Hi @pkandasamy91 All tests passed including some additional test coverage(73525c7). Can you kindly review it again? |
|
@pahud, thanks for adding the tests, but you have yet to resolve the comments from the previous review. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts
Show resolved
Hide resolved
packages/@aws-cdk/aws-ecs-patterns/lib/base/application-load-balanced-service-base.ts
Show resolved
Hide resolved
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
@pkandasamy91 Just fixed the lines as suggested and all tests passed. |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
piradeepk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ship it! Thanks for taking the time to contribute and resolve this issue!
|
Thank you for contributing! Your pull request is now being automatically merged. |
Allow users to specify the listener port as input to application/network load balanced fargate/ecs services.
Fixes: #4793
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license