Skip to content

sfr works for spot but not for on-demand

0

Hi, We have a sfr that works well for spot instances However, when trying to run it using on-demand it fails with the next error: allLaunchTemplatesTemporarilyBlacklisted Several attempts to launch on-demand instances have failed. Either the request could not be satisfied or the configuration is not valid. We will retry the request again later. For more information, see the description of the event. What can cause this? how to mitigate? what is the proper way to combine on-demand with EC2? We use 2 AZs, on single us region, multiple types of instances (c5d.large, c6i.large, c7a.large, c4.large, c6id.large, c7i-flex.large, c5.large, t3.small), AL2023 Thanks

asked 2 years ago189 views

2 Answers
0

The error you're encountering suggests that there might be issues with the launch template or the availability of the requested instance types in the specified Availability Zones. This error is not specific to Spot Instances or On-Demand Instances, but rather indicates a problem with launching instances in general.

To mitigate this issue and properly combine On-Demand with EC2, consider the following approaches:

  1. Review your launch template: Ensure that the launch template is correctly configured and compatible with both Spot and On-Demand instances. Check for any potential errors or misconfigurations.

  2. Instance type availability: The error might occur if the requested instance types are not available in the selected Availability Zones. Consider expanding your instance type selection or trying different Availability Zones.

  3. Capacity constraints: There might be temporary capacity constraints in the selected region or Availability Zones. Try spreading your requests across more AZs or even consider using a different region if possible.

  4. Gradual scaling: Instead of requesting a large number of instances at once, try scaling up gradually to avoid hitting capacity limits.

  5. Use EC2 Auto Scaling groups: Auto Scaling groups can help manage the mix of Spot and On-Demand instances more effectively. They can automatically handle capacity issues and instance launches.

  6. Implement a fallback strategy: Design your application to be flexible about instance types and Availability Zones. This increases the chances of successfully launching instances.

  7. Monitor and retry: Implement a system to monitor launch failures and automatically retry with different instance types or AZs.

  8. Check service quotas: Ensure that you haven't hit any service quotas for the instance types you're requesting.

By implementing these strategies, you should be able to improve the reliability of your instance launches for both Spot and On-Demand instances. Remember that while Spot Instances can offer significant cost savings, they come with the risk of interruptions, so it's important to design your workloads to be resilient and flexible.
Sources
Best practices for Amazon EC2 Spot - Amazon Elastic Compute Cloud
When to Use Spot Instances - Overview of Amazon EC2 Spot Instances

answered 2 years ago

  • The specific sfr works for spot instances but not for on-demand instances. Are there things to avoid when writing launch template that runs on both spots and on-demand? Are there (effectively) minimum requirements for On-Demand instances in us regions?

0

The issue was caused since the Launch template had Advanced Details > Purchasing option > Spot Instances. Reverting to 'Don't include in launch template' allows the Spot request to user template with on-demand instances. Side note: AWS Error is unclear, the conf. is valid just not compatible with on-demand

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.