sunmingtao / sample-code

3 stars 4 forks source link

CloudFormation: Invalid availability zone: [ap-southeast-2], Failed trying to describe product codes for snapshot #135

Closed sunmingtao closed 4 years ago

sunmingtao commented 4 years ago

Create a stack using CloudFormation

---
Resources:
  MyInstance:
    Type: AWS::EC2::Instance
    Properties:
      AvailabilityZone: ap-southeast-2
      ImageId: ami-da2ac3b8
      InstanceType: t2.micro

Get error

Invalid availability zone: [ap-southeast-2] (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 93a4540e-e10e-4a6c-ac0e-05d872b73430)
sunmingtao commented 4 years ago

ap-southeast-2a is region id. Update AvailabilityZone to ap-southeast-2a

Get error

Failed trying to describe product codes for snapshot '134978907867' (Service: AmazonEC2; Status Code: 400; Error Code: InvalidSnapshot.NotFound; Request ID: 19fafeba-77f6-435a-a8d9-ad45d7387a7f)
sunmingtao commented 4 years ago

I got the ImageId from

image

It's wrong. Should get it from: image

Update ImageId to ami-0970010f37c4f9c8d