I have configured an AWS auto-scale group with 2 available zones: us-east-1a and us-east-1c . Today, with the issue AWS had on us-east-1a, I noticed that new instances are not created on us-east-1c zone.
Any clues on what I should check on?
Thank you.
Amazon EC2 Auto Scaling can deploy EC2 instances across multiple Availability Zones within one region.
It cannot deploy instances across multiple Availability Zones.
If you wish to implement redundancy across regions, you would need to configure Amazon Route 53 with a health check to route traffic to instances or load balancers in different regions. However, Auto Scaling would continue to operate independently in each region.
Related
Is it possible to have ASG as a DR between two AZ? For example, I have 5 instance in AZ1 servicing requests. During the AZ outage, I wanted to spin-up the 5 Instances in AZ2 and serve the request. Is it possible to control the isntance spinning up in AZ2 if only AZ1 Fails ?
You can use AWS AutoScaling across multiple AZ, but only in a specific Region.
"Auto Scaling can work across multiple Availability Zones in an AWS
Region, making it easier to automate increasing and decreasing of
capacity."
If you are trying to have high availability you can use aws global services like AWS CloudFront or AWS Global Accelerator. Example Scenario:
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.
The definition of the vpc_zone_identifier parameter is a list of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside.
So suppose I list eu-west-1a and eu-west-1c for that parameter and a desired capacity of 3.
Is my ASG going to deploy my desired capacity randomly across the AZs (e.g. 2 + 1) or it will deploy 3 per AZ?
There will be only 3 instances distributed across the two AZs if the selected AZs have enough capacity. AWS tries to prioritize high-availability, so it will try to place the instances evenly across the AZs (2+1 in your case). Exact details are:
Amazon EC2 Auto Scaling attempts to distribute instances evenly between the Availability Zones that are enabled for your Auto Scaling group. Amazon EC2 Auto Scaling does this by attempting to launch new instances in the Availability Zone with the fewest instances. If the attempt fails, however, Amazon EC2 Auto Scaling attempts to launch the instances in another Availability Zone until it succeeds. For Auto Scaling groups in a VPC, if there are multiple subnets in an Availability Zone, Amazon EC2 Auto Scaling selects a subnet from the Availability Zone at random.
Why I should configure an AWS ECS Service or an EC2 Instance with two or more Private Subnets from the same VPC? What would be the benefits of doing such thing instead of configuring it within just one Subnet? Would it be because of availability? I've read the documentation but it was not clear about it.
Reference: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html
This is generally to distribute your ECS service across multiple availability zones, allowing your service to maintain high availability.
A subnet is bound to a single AZ, so it is assumed each subnet is in a different AZ.
By splitting across multiple subnets, during an outage load can be shifted to launch containers entirely in other subnets (assuming they're in different AZs).
This is generally encouraged for all services that support multiple availability zones.
More information on Amazon ECS Availability best practices are available from the blog.
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.