ec2: Value (dummy1a) for parameter availabilityZone is invalid error #30582
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
feature-request
A feature should be added or improved.
p3
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Status
Resolved
What is the issue?
The issue is related to how AWS CDK assigns availability zones (AvailabilityZone) during the creation of subnets. AWS CDK typically manages availability zones automatically based on the regions and availability zones available to your AWS account. However, sometimes there might be issues where AWS CDK incorrectly assigns an availability zone that is not valid or expected.
Error message
What is the impact?
It makes it difficult to make use of CDK Script to provision resources on AWS
Workaround
We can use this to create the VPC And Subnet separately, so it doesn't need to assign dummy1a to the Subnet created with (SubnetConfiguration)...
init {
// Create VPC with no subnets initially
val vpc = Vpc(this, "myVpc-01", VpcProps.builder()
.cidr("10.0.0.0/16")
.subnetConfiguration(emptyList())
.build())
Who is affected?
Devolopers, Software Engineers and Cloud Engineers
How do I resolve this?
make sure to read the Documentation properly. And check the ### Workaround I provided It worked!!
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.Subnet.html
Related issues
..
The text was updated successfully, but these errors were encountered: