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

질문됨 8달 전273회 조회
2개 답변
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
답변함 8달 전
profile pictureAWS
전문가
검토됨 8달 전
  • 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
답변함 8달 전
profile pictureAWS
전문가
검토됨 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠