Amazon VPC Availability - amazon-web-services

We are trying to expand our reliability setup using VPC in us-west-1. The 'a' and 'b' AZs work fine, but when I try to create subnets on 'c' it just fails with the message:
Value (us-west-1c) for parameter availabilityZone is invalid.
Subnets can currently only be created in the following availability zones:
us-west-1b, us-west-1a.
Is this a transient failure or are there just only two VPC-enabled AZs in that region? If the latter, is there a list somewhere with how many AZs in each region are VPC-enabled?

Each AWS account has own set of the AZ. Get list of the available AZ you can help with AWS cli tools:
aws ec2 describe-availability-zones
See details here: http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-availability-zones.html

Related

Why AWS RDS service needs two subnets from different AZs

As part of our project we are using AWS RDS postgres service. While creating RDS service AWS mandated to create two subnets from different AZs (ex: us-west-2a and us-west-2b). But we have only one subnet. Is there any way to overcome this problem.
Thanks in advance.
To ensure High Availability, you need to specify subnets in two different Availability Zones (AZs).
Each AZ operates in a different data center. If an AZ fails, the Amazon RDS service will automatically launch a replacement database in a different AZ. Therefore, it requires a minimum of two different AZs to be specfiied.

How to add different vpc instances(node) to existing eks vpc ( both vpc are different)

i have a aws eks cluster with in the dev vpc now i have few ec2 instance in the test-vpc so now i need add the add test-vpc instance to the existing existing cluster. can we do. ?
FYI VPC peering i have done as well and peering also working
An Amazon EKS cluster is provisioned in a single VPC.
If you have a dev-VPC and a test-VPC, you need to use two different EKS clusters.

Are there availability zones where AWS CodeBuild does not support VPCs?

I am trying to restrict access to a load balancer to a fixed IP and to CodeBuild agents. To that end, I want to add a security group rule that will prevent access to the load balancer unless traffic comes from the security group associated with the CodeBuild agents (as well as a separate security group rule that restricts access except from the fixed IP). I think this means I need to associate CodeBuild with the VPC of the load balancer.
However, when I try to update an existing CodeBuild project using Terraform's codebuild_project resourcce and configure the VPC like this:
vpc_config {
security_group_ids = [var.codebuild_sg]
subnets = var.public_subnet_ids
vpc_id = var.vpc_id
}
where the variables are the security group to be used by CodeBuild, the subnets into which CodeBuild should be launched and the VPC, respectively, I get the following error message:
Error updating CodeBuild project
(arn:aws:codebuild:eu-west-2:xxxxx:project/my-project):
InvalidInputException: CodeBuild currently doesn't support VPC in
eu-west-2c, please select subnets in other availability zones.
Are there some AZs for which CodeBuild does not support VPCs? Or does this message mean something else?
Yes, CodeBuild is not available in eu-west-2c. In eu-west-2 region, CodeBuild is only available in 2 AZs (eu-west-2a and eu-west-2b).

How to get available subnets from AWS VPC?

I am trying to create an Application Load Balancer using AWS CLI.
create-load-balancer
The error message is as follows:
An error occurred (ValidationError) when calling the CreateLoadBalancer operation: At least two subnets in two different Availability Zones must be specified
So I need to get available subnets from a specific zone (ex: us-east-2).
How can I get the all available subnets using AWS CLI?
In order to create a new Application Load Balancer you should use the following CLI Command:
aws elbv2 create-load-balancer --name my-load-balancer --subnets SUBNET_1 SUBNET_2
You can get the list of available subnets by analyzing your VPC. To do this please follow these steps:
Open your AWS Console
Navigate to VPC
Open Subnets section on the left
Get the subnets that are linked to your VPC and make sure that you have two subnets in two different availability zones. If you don't have then please create them
Use these subnets with the above CLI command
If you don't have console access for any reason then use this command to get the list of available subnets from the CLI:
aws ec2 describe-subnets

Creation RDS aurora cluster via cloudformation

I am creating a VPC with ec2 instances and 2 subnets and 2 availability zones through a cloudformation template,
I always get the same error when reaching the stage of creating the RDS cluster /
Your subnet group doesn't have enough availability zones for a storage cluster. You must have at least two availability zones to map to a storage cluster.
you can find the templates in this link :
link to templates
I just ran into this same issue and I was definitely using 2 subnets from 2 different AZs. There might be some underlying backend issue... selecting different AZs worked for me. ie - I was trying subnets from us-east-1a and us-east-1b, I switched to using subnets from us-east-1c and us-east-1d and it worked.
I contacted AWS and they told me this is because Aurora is not available on us-east-1b and us-east-1f
There is no documentation about it and they are looking to add these AZs, but in the meantime you'll need to use another AZ
The error which you have posted occurs when your DBSubnetGroup is confined to a single availability zone. I think both of your subnets are getting created in the same AZ.
In the AWS::EC2::Subnet documentation, it is recommended to leave the AZ allocation for subnet to AWS.
Removal of the Availability zone should resolve your issue.
Hope this helps.