-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(aws-autoscaling): fix an AutoScalingGroup example in the README.md #970
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,17 @@ An `AutoScalingGroup` represents a number of instances on which you run your cod | |
pick the size of the fleet, the instance type and the OS image: | ||
|
||
```ts | ||
import autoscaling = require('@aws-cdk/aws-autoscaling'); | ||
import ec2 = require('@aws-cdk/aws-ec2'); | ||
|
||
new ec2.AutoScalingGroup(stack, 'ASG', { | ||
const vpc = new ec2.VpcNetwork(stack, 'VPC', { | ||
maxAZs: 3 | ||
}); | ||
|
||
new autoscaling.AutoScalingGroup(stack, 'ASG', { | ||
vpc, | ||
instanceType: new ec2.InstanceTypePair(InstanceClass.Burstable2, InstanceSize.Micro), | ||
machineImage: new ec2.LinuxImage({ | ||
'us-east-1': 'ami-97785bed' | ||
}) | ||
machineImage: new ec2.AmazonLinuxImage() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a small comment explaining what this does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, I will add it. The AMI does not work for
Hence, I think that it is more robust to |
||
}); | ||
``` | ||
|
||
|
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.
No need to limit AZs in this example, just leave
new ec2.VpcNetwork(stack, 'VPC')
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.
Ok, I will remove it.