aws-cdk-examples icon indicating copy to clipboard operation
aws-cdk-examples copied to clipboard

feat(python/ecs): provide an example to use the ecs-patterns module

Open its-mirus-lu opened this issue 3 years ago • 0 comments
trafficstars

Describe the feature

Per the aws-ecs-patterns readme:

This library provides higher-level Amazon ECS constructs which follow common architectural patterns. It contains:

Application Load Balanced Services
Network Load Balanced Services
Queue Processing Services
Scheduled Tasks (cron jobs)
Additional Examples

For example the Application Load Balancer construct for EC2 backed ECS includes, by default, a lambda function that is triggered by ASG lifecycle events and handles draining nodes on a termination lifecycle event (i.e. it will wait until all tasks on the node are complete before allowing termination of the node to proceed).

Use Case

This is a newer L2 construct that builds on top of the existing aws-ecs module by adding additional functionality out of the box (i.e. the node draining example mentioned above).

The example would demonstrate how to define an application load balanced ec2 service since it is one of the more difficult to configure since the ApplicationLoadBalancedEc2Service construct requires additional configuration if a custom auto-scaling group is used as the cluster capacity provider.

The structure of the example would mirror that of the existing example for ecs-service-with-advanced-alb-config, providing the reader with the ability to compare the code structure side-by-side.

Proposed Solution

The structure of the example would mirror that of the existing example for ecs-service-with-advanced-alb-config, providing the reader with the ability to compare the code structure side-by-side.

Other Information

No response

Acknowledgements

  • [X] I may be able to implement this feature request
  • [ ] This feature might incur a breaking change

Language

Typescript, Python

its-mirus-lu avatar Jul 07 '22 02:07 its-mirus-lu