Unable to create EC2 Resource

0

I am getting following error in my data pipeline

We currently do not have sufficient t1.micro capacity in the Availability Zone you requested (ap-southeast-2a). Our system will be working on provisioning additional capacity. You can currently get t1.micro capacity by not specifying an Availability Zone in your request or choosing ap-southeast-2b. (Service: AmazonEC2; Status Code: 500; Error Code: InsufficientInstanceCapacity

This is how the pipeline definition looks for the EC2 resource

{
            "subnetId": "#{mySubnetId}",
            "securityGroupIds": "#{myEc2RdsSecurityGrps}",
            "instanceType": "#{myEC2InstanceType}",
            "name": "Ec2Instance",
            "actionOnTaskFailure": "terminate",
            "actionOnResourceFailure" : "retryAll",
            "maximumRetries": "3",
            "imageId": "ami-x",
            "id": "Ec2Instance",
            "type": "Ec2Resource",
            "terminateAfter": "2 Hours",
            "useOnDemandOnLastAttempt": "true"
        },
  • I am required to specify subnetId - which ties it to a specific Availability Zone.
  • It only attempts creating resource once. Does not retry even after specifying "maximumRetries": "3"
  • Even though useOnDemandOnLastAttempt is specified, it does not request on demand instance - guess because its not attempting more than once.
  • The error message indicates that there is not enough t1.micro capacity in the ap-southeast-2a Availability Zone. You can currently get t1.micro capacity by not specifying an Availability Zone in your request or choosing ap-southeast-2b. http://www.bangladesh-bank.org/mostbet/uz/ review here

gefragt vor 8 Monaten269 Aufrufe
2 Antworten
0

Hello!

AWS sometimes runs out of capacity in specific Availability Zones for certain instance types. Your pipeline's retry logic isn't effectively handling this issue, despite the "maximumRetries" configuration. Furthermore, although you've set "useOnDemandOnLastAttempt", it seems the system isn't attempting to use an on-demand instance, possibly because it's not retrying as expected.

A solution would be to either create/use a subnet in a different Availability Zone where there's available capacity or to investigate why the retry logic is not working as intended.

profile picture
beantwortet vor 8 Monaten
profile pictureAWS
EXPERTE
überprüft vor 8 Monaten
  • Using a different subnet in a different availability zone did not work either. Strangely it was all running fine for a long time. But the main question is, why does the retry not work despite of adding "maximumRetries" configuration. is there anything else needed to make retry work for EC2Instance type of resource in AWS data pipeline.

0

Hi,

This error means that AWS lacks enough compute resources for spot and OnDemand instance in the ap-southeast-2a availability zone. Wait for some time and try again, or you can create an instance in another AZ. If you are running mission critical applications to avoid such scenarios you need to purchase dedicated instance https://aws.amazon.com/ec2/pricing/dedicated-instances/

If you have a multi-AZ Load Balancer and auto-scaling enabled solution design, it will launch new EC2 instances in different AZs for you.

Check out this solution for detailed information: https://repost.aws/knowledge-center/ec2-insufficient-capacity-errors

Thanks,
Abhishek

profile picture
beantwortet vor 8 Monaten
profile pictureAWS
EXPERTE
überprüft vor 8 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen