Aws-cdk: ECS-PATTERNS: Are there any new patterns that users would like to see?

Created on 18 Dec 2019  路  4Comments  路  Source: aws/aws-cdk

Please comment with any new patterns that you would like to see (Specific to ECS). Please provide the following in each comment:


Use Case

why do you need this feature/what would it be used for(scenarios)?

Proposed Solution

If you have a solution proposal

Other

Any additional information

@aws-cdaws-ecs-patterns efforlarge feature-request managementracking p2

Most helpful comment

I also want a REST API pattern, where multiple services can be mounted onto different paths on an ALB like:

/api/users -> users service
/api/orders -> order service

All 4 comments

I want an AWS App Mesh enabled ECS service as a pattern: https://github.com/aws/aws-cdk/issues/4566

I also want a REST API pattern, where multiple services can be mounted onto different paths on an ALB like:

/api/users -> users service
/api/orders -> order service

I'd like to have a resilient scheduled Fargate task as described here: https://cloudonaut.io/resilient-task-scheduling-with-ecs-fargate-cron-scheduled-task/

tldr; it uses Step Functions instead of CloudWatch Rules

Use Case
I'd like to use a pre-existing load balancer listener for multiple ECS services that are differentiated by ALB rules and rule priorities.

Proposed Solution
Add a listener prop to ApplicationLoadBalancedServiceBaseProps which identifies which load balancer listener rules should be added to and an addListenerRule(rule: ApplicationTargetProps) method to ApplicationLoadBalancedEc2Service and ApplicationLoadBalancedFargateService. When addListenerRule() is called, the pattern construct would add ApplicationListenerRules that reference the listener specified in the constructor props.

const loadBalancedEcsService = new ecsPatterns.ApplicationLoadBalancedEc2Service(stack, 'Service', {
  cluster,
  // New prop:
  listener: albListener,
  memoryLimitMiB: 1024,
  taskImageOptions: {
    image: ecs.ContainerImage.fromRegistry('test'),
  },
});

// New method:
loadBalancedEcsService.addListenerRule({
  containerPort: 80,
  hostHeader: "something.example.com",
  priority: 10,
});
Was this page helpful?
0 / 5 - 0 ratings

Related issues

pepastach picture pepastach  路  3Comments

EduardTheThird picture EduardTheThird  路  3Comments

nzspambot picture nzspambot  路  3Comments

eladb picture eladb  路  3Comments

schof picture schof  路  3Comments