- 新しい順
- 投票が多い順
- コメントが多い順
Hello!
On-Demand Fleets, unlike Spot Fleets, do not spread across availability zones by default. The best way you could achieve a similar effect with On-Demand instances would be to use On-Demand Capacity Reservations across multiple AZs.
Here's the CDK documentation on ODCRs:https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.CfnCapacityReservation.html
You will want these capacity reservations to be referenced by the Launch Template you are using for your On-Demand Fleet. You can do that by adding them to the launchTemplateData portion of the template.
This guide goes through the steps for setting up such reservations and adding them to the template, though this uses the AWS CLI rather than the CDK: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-launch-on-demand-instances-using-targeted-capacity-reservations-walkthrough.html
One final note: Don't confuse these with the CfnCapacityReservationFleet object. These do create Capacity Reservation Fleets, but such fleets only exist in a single AZ. For multi-AZ setups, creating separate capacity reservations and referencing them in the launch template is best.
Hope this helps!
関連するコンテンツ
- AWS公式更新しました 1年前