Created
June 4, 2020 07:32
-
-
Save nirsky/ff5e55cd81586220b1b44176ab29647f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create your ECS cluster, don't use the capacity option. | |
// We will add it in a different statement so we can keep the returned AutoScalingGroup | |
const ecsCluster = new ecs.Cluster(this, 'ecs-cluster', { | |
vpc: myVPC, | |
clusterName: 'my-cluster', | |
// ...other props | |
}); | |
const autoScalingGroup: AutoScalingGroup = ecsCluster.addCapacity('cluster-capacity', { | |
instanceType: InstanceType.of(InstanceClass.T2, InstanceSize.LARGE), | |
keyName: 'some-key..', | |
desiredCapacity: 2, | |
// ...other props | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment