AWS EC2 limit error while updating EC2 instance of Elastic Beanstalk - amazon-web-services

While updating EC2 instance of Elastic Beanstalk the following error message appeared. But for my other account the following error, not observed:
Updating Auto Scaling group named: awseb-e-tiknsbmh4d-stack-AWSEBAutoScalingGroup-R3UXFI8KMCSN failed Reason: You have requested more instances (1) than your current instance limit of 0 allows for the specified instance type
Is it account base specific? And what is the best way to fix it?

Yes, there are limits which are account-specific.
You can check your EC2 quotas using the AWS Quota Service. [1]
You can view the EC2 quotas which apply for the account you are currently signed in by visiting the following URL: https://eu-central-1.console.aws.amazon.com/servicequotas/home?region=REGION#!/services/ec2/quotas by replacing REGION with your region identifier, e.g. us-east-1.
If the quota is marked as adjustable, you can request an increase via this service.
References
[1] https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html

This message is related to Amazon EC2. Even though the instance was launched by Elastic Beanstalk, the limit is related to the number of concurrent Amazon E2 instances permitted.
There are two types of limits:
Total number of concurrent instances (default: 20)
Number of concurrent instances per instance type (default varies)
You can view these limits in the Limits section of the Amazon EC2 management console. You can also request an increase in the limits.
The limits are "per account, per region".

Related

AWS EC2 rettirement

I got the mail from Amazon regarding my EC2 as follows:
EC2 has detected degradation of the underlying hardware hosting your Amazon EC2 instance (instance-ID: xxxxxxxx) associated with your AWS account (AWS Account ID: xxxxxx) in the ap-south-1 region. Due to this degradation your instance could already be unreachable. We will stop your instance after 2020-12-29 22:00:00 UTC. Please take appropriate action before this time.
The affected instances are listed below:
xxxxxxx
So what would I do now to keep my data safe ?
AWS provides guides on what to do when an instance is about to be retired:
What do I need to know when my Amazon EC2 instance is scheduled for retirement?
The easiest way would be to stop/start the instance:
You are required to stop and then start the instance at your preferred time before the instance retirement date. Stopping and starting the instance moves the instance to another healthy host.
However, exact details depend on your instance type (e.g. EBS based or instance store based), thus please read the guide in the link provided to understand your options which are mostly determined on your actual EC2 instance setup.

AWS EC2 - Can we restrict(decrease) the max storage volume limit allocated per region in AWS?

Scenario:
- t2.micro instances : Amazon Linux AMI
- Number of instances : 15
- Volumes
root Volume : 8GiB
Additional EBS Volume : 10000 GiB
When i am trying to launch the Ec2 instances, i am getting following error:
Launch Failed You have exceeded your maximum gp2 storage limit of 100 TiB in this region. Please contact AWS Support to request an Elastic
Block Store service limit increase. Hide launch log
Creating security groups Successful (sg-0567946d12185cda5) Authorizing inbound rules Successful
Initiating launches Failure Retry
I know why this error came up. In the AWS Docs its clearly mentioned that the
Amazon Elastic Block Store (Amazon EBS) Limits: Total volume storage
of General Purpose SSD (gp2) volumes - Defailt Limit is 100 TiB
For increasing limit as mentioned in error message i have to contact AWS.
Is there any way by which i can decrease this limit?
In the Amazon EC2 management console, click Limits in the left navigation pane.
Scroll down to EBS Limits to view the current limits.
You can request an increase/decrease of the limits by clicking Request limit increase.

Master Instance Group: Exceeded EC2 Instance Quota

I am getting this error Master Instance Group: Exceeded EC2 Instance Quota, when I create a new cluster on Amazon EMR with 1 Master node only or 1 Master and 2 Core nodes. However, there are no EC2 instances running on my account.
What should I do? I raised a ticket, asking if I can get a quicker solution here.
In your case I think you are trying to access a new region or new instance type, AWS sometimes does that when you are in free tier, they allow access to 2-3 regions or free instance types only. Then you have to request access from AWS by raising a case.
But in Normal scenario, this is what happens:
You may face an error like Exceeded EC2 Instance Quota while you are trying to spin up new instances either standalone or in cluster.
This error is caused because you have hit the limit on number of instances allowed in your AWS account.
This limit is region and instance size specific. To get rid of this error you will have to request Amazon to increase the EC2 instance limit.
Requesting a limit increase is simple. Below are the steps:
Most service limit increases can be requested through the AWS Support Center by choosing Create Case and then choosing Service Limit Increase.
Most service limits are specific to a particular AWS Region, so be sure to submit a request for each Region you plan to use. Many services support requesting multiple limit increases for the same service through one support case. After creating your first request, choose Add another request and then choose a new limit type or Region.

AWS: DB Instance quota exceeded

During CloudFormation stack-creation I get a CREATE_FAILED error for Aurora with reason DB Instance quota exceeded.
I assume it means there are too many DB instances running (I'm on a company account with a federated login, and not the only one creating stacks and launching instances).
How do I fix it? Do need to delete some running instances? Also, how do I find out what the allowed quota is?
Limits in Amazon RDS shows a limit of 40 Amazon RDS DB Instances per Region.
You can contact AWS Customer Service to request a limit increase. Here's the Support screen:

AWS EIP Limit Increase

I understand that I get 5 EIP per region and if I need more I need to request service limit increase.
My question is how many can I get after service limit increase? Is it possible to get 50 EIP?
Please note that the DNS IP that AWS provides is not an option since that cannot be assigned to after instance is created and DNS IP cannot be attached to the second interface of my device (it can only be assigned to eth0 of a given EC2 instance)
All I need is a public IP that I can assign to eth1 or eth2
And I need to do that for about 50 EC2 instances.
Yes you can get more EIP on request. You can then attach/reattach them for your EC2 instances.
Contact AWS Support - Indicating the Service Limit Increase.
EIP Service Limit Increase - Link
General EC2 Limits Info - Link
you can increase your EIP service limit increase by
Service Quota console https://console.aws.amazon.com/servicequotas/home/services/ec2/quotas/L-0263D0A3
By AWS Support Console (Service Limit Increase)
By API calls like boto3 https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/service-quotas.html#ServiceQuotas.Client.request_service_quota_increase or using cli like https://docs.aws.amazon.com/cli/latest/reference/service-quotas/request-service-quota-increase.html
we can automate this process in aws
create cloudtrail for multiregion enable log stream
Using Log Group we will add Log Subscription filter where we have to define filter pattern "AllocateAddress" and add lambda function with it
In our lambda function we will create Python Script in which
we will check all region total number of Elastic Ip present in all region and fetch applied quota value from Service Quota then make math expression ((current EIP value/Applied Quota Value)*100) if the
value is grater then 80% then sent request to increase request value