VPC creation is failed in ap-northeast-1 region due to unsupported availability zone .
This repository has following code to set availability zone list.
availabilityZones: [`${props.env.region}a`, `${props.env.region}b`, `${props.env.region}c`],
But it does not work when the target region has different names as availability zone name.
Expected Behavior
VPC creation is successful.
Current Behavior
VPC creation is failed as follow when it tries to run ./install.sh in ap-northeast-1 region.
shared-infra-stack
shared-infra-stack: deploying... [3/5]
shared-infra-stack: creating CloudFormation changeset...
13:06:35 | CREATE_FAILED | AWS::EC2::Subnet | sbtecsvpcPublicSubnet2Subnetxxxxxx
Resource handler returned message: "Value (ap-northeast-1b) for parameter availabilityZone is invalid. Subnets
can currently only be created in the following availability zones: ap-northeast-1a, ap-northeast-1c, ap-northea
st-1d. (Service: Ec2, Status Code: 400, Request ID: xxxxxxxxxxxxxxxxxxxxxxxxxx)" (RequestToken: xxxxxxxxxx, HandlerErrorCode: InvalidRequest)
Describe the bug
VPC creation is failed in ap-northeast-1 region due to unsupported availability zone . This repository has following code to set availability zone list.
availabilityZones: [`${props.env.region}a`, `${props.env.region}b`, `${props.env.region}c`],
But it does not work when the target region has different names as availability zone name.Expected Behavior
VPC creation is successful.
Current Behavior
VPC creation is failed as follow when it tries to run
./install.sh
in ap-northeast-1 region.Reproduction Steps
Run the below.
Possible Solution
Specify proper availability zone list depending on target region.
Additional Information/Context
Actual part that make this issue as follows. https://github.com/aws-samples/saas-reference-architecture-ecs/blob/main/server/lib/shared-infra/shared-infra-stack.ts#L40 https://github.com/aws-samples/saas-reference-architecture-ecs/blob/main/server/lib/tenant-template/ecs-cluster.ts#L48
CDK CLI Version
2.142.1 (build ed4e152)
Framework Version
No response
Node.js Version
v18.19.1
OS
macos
Language
TypeScript
Language Version
No response
Other information
No response