Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(aws-ecs): ecs.Cluster.fromClusterAttributes: Allow adding capacity providers on imported clusters

See original GitHub issue

Add capacity providers from another stack.

Use Case

The cluster can receive more than one capacity provider, so it may be necessary during the cluster lifetime to add these capacity providers from other stacks.

Proposed Solution

When using the fromClusterAttributes method, the returned object, ImportedCluster, must allow the addition of capacity providers.


const cluster = ecs.Cluster.fromClusterAttributes(this, 'EcsCluster', {
  clusterName: props.clusterName,
  securityGroups: [asgSecurityGroup]
const capacityProvider = new ecs.AsgCapacityProvider(this, 'AsgCapacityProvider', {


Obs.: Similar to

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:7
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

FlorinAsavoaiecommented, Jun 7, 2022

Not sure why this was closed…

dsinghvicommented, Jul 25, 2022

+1 Would be nice to have this feature. cc @uttarasridhar @drigos

Read more comments on GitHub >

github_iconTop Results From Across the Web

class Cluster (construct) · AWS CDK
This method adds compute capacity to a cluster by creating an AutoScalingGroup with the specified options. Returns the AutoScalingGroup so you can add...
Read more >
Deploy Fargate Capacity Provider Strategy
Enable Fargate capacity provider on existing cluster. First, we will update our ECS cluster to enable the fargate capacity provider.
Read more >
aws_ecs_cluster | Resources | hashicorp/aws
Provides an ECS cluster. NOTE on Clusters and Cluster Capacity Providers: Terraform provides both a standalone aws_ecs_cluster_capacity_providers resource, ...
Read more >
awsecs - Go Packages
An Auto Scaling Group Capacity Provider. This allows an ECS cluster to target a specific EC2 Auto Scaling Group for the placement of...
Read more >
@aws-cdk/aws-ecs | Yarn - Package Manager
declare const vpc: ec2.Vpc; // Create an ECS cluster const cluster = new ecs.Cluster(this, 'Cluster', { vpc, }); // Add capacity to it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found