anilit99
anilit99

Reputation: 597

AWS EC2 - Clarification on number of instances

This is from the amazon ec2 FAQ :

Q: How quickly can I scale my capacity both up and down?

Amazon EC2 provides a truly elastic computing environment. Amazon EC2 enables you to increase or decrease capacity within minutes, not hours or days. You can commission one, hundreds or even thousands of server instances simultaneously. When you need more instances, you simply call RunInstances, and Amazon EC2 will typically set up your new instances in a matter of minutes. Of course, because this is all controlled with web service APIs, your application can automatically scale itself up and down depending on its needs.

Now again as per the same FAQ, I am only allowed to launch 20 instances per region. They said, I have to fill in a request form if I need more than 20 instances. So, in effect, I cant spin up more than 20 programmatically ?

What am I missing here ? how can we launch 100 instances let alone thousands. Sorry if this is the wrong place for such a question.

Upvotes: 0

Views: 3372

Answers (3)

helloV
helloV

Reputation: 52393

You cannot launch instances beyond the instance limit. You need to make a request to increase the instance limit. This is a safety feature so that:

  • A wild loop in your SDK/API script does not launch instances continuously
  • A malicious user does not launch a large number of instances
  • A hacker gets access to your account and launches a large number of instances
  • An incorrectly configured autoscaling group launches huge number of instances

If you require more than your instance limit, you need to submit a request to AWS. See: Amazon EC2 Service Limits. AWS will review your request and approve it.

Upvotes: 8

Ele
Ele

Reputation: 33726

AWS faqs provides a clear answer

You are limited to running up to a total of 20 On-Demand instances across the instance family, purchasing 20 Reserved Instances, and requesting Spot Instances per your dynamic Spot limit per region. New AWS accounts may start with limits that are lower than the limits described here. Certain instance types are further limited per region as follows

enter image description here

For Spot instance limits AWS states

The usual Amazon EC2 limits apply to instances launched by a Spot Fleet, such as Spot request price limits, instance limits, and volume limits. In addition, the following limits apply:

  • The number of active Spot Fleets per region: 1,000

  • The number of launch specifications per fleet: 50

  • The size of the user data in a launch specification: 16 KB

  • The target capacity per Spot Fleet: 3,000

  • The target capacity across all Spot Fleets in a region: 5,000

  • A Spot Fleet request can't span regions.

  • A Spot Fleet request can't span different subnets from the same Availability Zone.

These limits protect you from a hacker attack, stolen API keys, ETC. If you want to increase these limits, you need to send a form to AWS support team: AWS Support Center

Upvotes: 0

kichik
kichik

Reputation: 34704

You are missing the fact that limit increase requests are very easy to make and are almost always granted with no questions asked within a day or two.

To request a limit increase:

  1. Open the AWS Support Center page, sign in if necessary, and choose Create Case.
  2. For Regarding, choose Service Limit Increase.
  3. Complete Limit Type, Use Case Description, and Contact method. If this request is urgent, choose Phone as the method of contact instead of Web.
  4. Choose Submit.

Upvotes: 2

Related Questions