Can EC2 20 instance limit be bypassed by use of multiple accounts? - amazon-ec2

Just a simple question, say I on a research team with 10 members and we want to deploy a project that will require on-demand leasing of 200 EC2 instances. Can we virtually bypass the 20 instances limit by creating 10 AWS accounts (one each) and then lease on demand up to 200 instances?

You can do that - you can have as many accounts, with their appropriate payment details, as you like. You then have the standard 20-instance limit associated with each account.
Bear in mind though, that these accounts are all separate and have their own sets of access keys. Any technology you deploy to span instances across these accounts will need to be aware of that, since your 'pool' manager will need the appropriate key for the account it is attempting to launch an instance in. You may also encounter complexities with EBS sharing, Security Group access (if, for example, you have a Domain Controller in one account, VMs in the other accounts will not be able to see it), and Load Balancing and VPC are likely to be difficult at best.
Amazon are usually fairly quick to respond to limit increase requests - after all, the more instances you're using, the more money they're making. They obviously want to ensure they have capacity for your requirement, which is why they manually 'vet' requests, but provided you have a reasonable business case they're fairly accomodating.

http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2
You are limited to running 20 On-Demand or Reserved Instances, and
running 100 Spot Instances per region. Cluster GPU Quadruple Extra
Large instances and High I/O Quadruple Extra Large instances are
limited to running 2 On-Demand instances per region [...].
Increase your limit with http://aws.amazon.com/contact-us/ec2-request
Bid the 'on-demand price' for a bunch of spot instances. You will never end up paying full price, but will rarely have your spot instances terminated. See
http://aws.amazon.com/ec2/spot-instances/ and deciding on your spot bidding strategy

Related

For long running important apps what Aws EC2 instance type select?

I have been checking all EC2 instances and.. from all types I'm debating between choosing -reserved instance or dedicated instance-
Spot and on demand doesn't meet the requirement I think.
I don't have more information about the type of app to be run.
It sounds like you are concerned with the availability (or up time) of different EC2 instances. The difference between reserved, dedicated, spot and on-demand has more to do with cost than availability. AFAIK AWS does not guarantee different levels of availability for different EC2 instance types or cost structures.
Dedicated instances are ones that won't run on the same hardware as other instances, but dedicated instances can run on the same hardware as other non-dedicated instances in the same account. Dedicated instances shouldn't have any affect on availability.
The other options, (reserved, spot and on-demand) are just different cost structures. They don't affect performance or availability.
AWS advertises 99.99% uptime. This is from their SLA:
AWS will use commercially reasonable efforts to make the Included Services each available for each AWS region with a Monthly Uptime Percentage of at least 99.99%, in each case during any monthly billing cycle (the “Service Commitment”). In the event any of the Included Services do not meet the Service Commitment, you will be eligible to receive a Service Credit as described below.
So, any instance will be appropriate for important long running apps, you just need to select the instance type that is large enough and pick the right cost structure. You probably don't need dedicated instances, unless you have determined that steel time is going to impact your app's performance.
I dont think its Instance Types you need to worry about - they are just different sizes of machines that have different ratios of CPU/RAM/IO. High-Availability can only be achieved by designing it into both the application and infrastructure. Reservation Types (spot/on-demand/dedicated) are more about cost optimisation based on how long and much capacity you need.
Spot instances are transient - you can reserve a spot for upto 6 hours then it will be terminated. Probably not a good fit, but it depends on how long is "long running"? You get a significant discount for using spot instances if you can live with the limitations.
On-Demand and Reserved are basically the same service, but on-demand is pay-as-you-go vs reserved instance is a fixed length contract and upfront payments. Reserved instances give you the best value for money over the long term, but on-demand gives you flexibility to change instance size or turn off the instance to save money.
Going shared vs Dedicated is generally a compliance question as it gets a lot more expensive to reserve your own hardware to run just your own instances.

Behavior on startup times of ec2

I have a use case where we have a very large computation job, which can be broken up into many small units of work fairly efficiently. There could be effectively lets say 1,000 hours of computational work for an m4.large instance. Lets say I wanted the result back within the next 10 minutes, that would mean I would need 6,000 instances to get the job done in time.
So far I have setup AWS batch, I haven't used any more than the 20 m4.large instances your account comes with. I know I can up the amount of instances requested by AWS but I still don't really know much about what the behaviour is if you suddenly try and provision thousands of on-demand instances or if AWS limits how many instances you can use.
So my question is am I able to launch thousands of m4.large instances on-demand? And if so what are sort of times would I be looking at for all instances to get to the Running state.
I have done this many times with ~100 instances but never in the thousands of instances.
STEP 1: Open a support ticket with AWS. You will need to get your account approved, credit checked, etc. My customers are very big companies, so for them the credit and approval process is easy. If you are a little guy, I don't know.
STEP 2: Think thru your VPC design and how you will address that many instances. If is one thing to have 5 instances going thru a NAT Gateway, but a hundred systems will bring Internet connectivity to its knees.
STEP 3: Think thru the networking bandwidth required. Do you need placement groups or very high speed Intranet or Internet connectivity?
STEP 4: Be prepared that you cannot launch all instances with a specific instance type (capacity not available error). Have a selection of instances that you can fall back on.
STEP 5: Create your own software, I use Python, to launch the instances, perform updates, install software, etc. You can then poll the instances using the Boto3 EC2 API to determine when all the instances are running. The length of time for 1,000 instances won't be much different than 1 instance.
Now for the real world. If your job takes 1,000 hours, launching 1,000 instances will not reduce it to 1 hour unless you have a really scalable software design with minimum inter-machine communications required. Once you go beyond 10 systems, networking bandwidth and communications overhead becomes an issue. Even though AWS's resources are huge, launching 1,000 EC2 instances at one time by one customer is not a common launch case.
I would also NOT launch 1,000 instances to get processing down to 10 minutes. It can take 10 minutes for your instances to come online, get updated, synchronize, etc. This means that you will be spending 50% of your budget on waiting time. For really large jobs today we prefer to use Hadoop / Spark where scaling to hundreds of machines is realistic.
You can contact AWS Customer Service to increase your EC2 limits (use the link shown in the Limits section of the EC2 management console). They will verify your use-case.
You might also consider using Spot Pricing to lower your costs. Spot instances take longer to provision.
Sample use-case: Gigaom | Cycle Computing once again showcases Amazon’s high-performance computing potential
There are also services like Spotinst that can help you provision servers at the lowest possible cost.

AWS, can I get disk (volume) images sent to me on DVD?

In AWS, can I get disk (volume) images sent to me on DVD?
This would be in preparation to save costs by eliminating the instances and volumes. It took a year to get everything created, the right instances and structure hierarchy. And experimentation to select the right combinations of instances and volume types.
My company wants to save the monthly costs (for a year or so) but also wants the option and ability to restart everything when they want.
Is it possible to be able to save the whole set-up, remove all the instances and volumes (to eliminate costs), and re-institute it back when needed?
Depending on your instance operating system (RedHat, Windows, etc.) you might not be able to get images of the EC2 instance in any form other than AMIs or snaphots stored at Amazon. The reason is Amazon's license does not permit this.
I have not heard of AWS offering a service to back up your data to DVDs. If your goal is to save money, think of the cost per hour that AWS would charge you to manually create DVDs. The DVD write process is slow ....
Instead approach the situation of either creating Amazon Machine Images (AMIs) of your instances or creating snapshots of your instances. You would need to pay the cost of data storage which is about $.05 per GB. 100 GB of data would cost $60.00 per year. 100 GB on DVDs that AWS generated would be significantly higher if offered.
You only can export an image if you import in the first place (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html)
I recommend just creating snapshots, it won't bring the cost to zero but it's cheaper than having stopped instances with unused volumes. If volumes are General Purpose SSD (gp2), snapshots will be half of the price ($0.05 per GB-month)
I definitely don't recommend storing data on DVDs, take advantage of the cloud and the resilience it provides. I'm sure these DVDs won't work when you try to use them after a year if you can even find them, that will cost more than staying on the cloud. :)

Do Reserved Instances in AWS EC2 Have Better Performance Than On-Demand or Spot Instances?

I'm considering purchasing an Amazon AWS EC2 reserved instance. Does any one know of any performance benefits for reserved vs. on-demand, spot instances? Or is this simply a pricing difference? Do reserved instances get spun up on VMs with less congestion and that sort of thing is what I'm thinking about.
Thanks,
Michael
Despite its name, "reserved instance" is a billing construct, not an instance type. When you purchase a reserved instance, no instance is started. It simply affects the price you pay for a standard on-demand instance that matches the availability zone, instance type, operating system of the reserved instance purchase.
Purchasing a reserved instance can reduce the hourly price you pay for an on-demand instance that has already been running for months. If you terminate that on-demand instance, the reserved instance pricing switches to any other on-demand instance that is running and matches the specs.
Spot instances are the same as on-demand instances except in when they are started/terminated and how much they cost.
Spot instances are basically when amazon has unused resources they can sell them at a slightly lower price to hopefully get those used up. The issue with spot instances is that they can be shut off at any time so you're taking a risk.
Reserved instances are computing power you can purchase upfront at a discounted rate. You're basically saying that you're going to use this type of system for 1 or 3 years or if you're not going to use it you want to ensure that you can use it at any time.
On-demand is the default for most people, I think. They're there. They're available when you need them and when you don't need them you stop paying for them.
If you purchase the same types of machine configs for each type of instance then there is no performance difference, only price.
The Amazon page on reserved instances doesn't mention any other benefits apart from the cost.
Adding to what #BuildStarted said, I have noticed longer start times with spot instances. I'm guessing that's because there is some additional time needed to compute the current spot price and find capacity.
Once an instance is up and running, though, you shouldn't see any difference between the 3 pricing methods for the same instance type.

AWS Amazon EC2 Spot pricing

I'd like a non-amazon answer to this quandry...
It looks like, via spot instance pricing, you could run an instance for 22 or 23 cents an hour, for as many hours as you want, because the historical charts for hours/days/months show the spot price never goes over 21 (22?) cents per hour. That's like half of the non-reserved instance cost for the same sized instance and its even less than a reserved instance would ever work out to be per hour. With no commitment.
Am I missing something, do I have a complete and total misunderstanding of the spot/bid/ask instance mechanisim? Or is this a cheap way to get an 24/7 instance while Amazon has a bunch of extra capacity?
Jeremy
No, you are not missing anything. I asked the same question many times when I first looked at Spot, followed by "why doesn't everyone use this all the time?"
So what's the downside? Amazon reserves the right to terminate a Spot instance at any time for any reason. Now, a normal "on-demand" instance might die at any time too, but Amazon goes to great efforts to keep them online and to serve customers with warnings well in advance (days / weeks) if the host server needs to be powered down for maintenance. If you have a Spot instance running on a server they want to reboot ... they will just shut it off. In practice, both are pretty reliable (but NOT 100%!!), and many roles can run 24/7 on spot without issues. Just don't go whining to Amazon that your Spot instance got shut off and your entire database was stored on the ephemeral drive... of course if you do that on ANY instance, you are taking a HUGE (and very stupid) risk.
Some companies are saving tons of money with Spot. Here's a writeup on Vimeo saving 50%, and one on Pinterest saving 60%+ ($54/hr => $20/hr).
Why don't more companies use Spot for their instances? Many of the companies buying EC2 instance hours aren't very price sensitive and are very very risk-adverse, especially when it comes to outages and to operational events that sap engineering effort. They don't want to deal with the hassle to save a few bucks, especially if AWS fees aren't a significant cost-center versus personel. And for 24/7 instances, they already pay 1/2 price via "reserved instances", so the savings aren't as dramatic as they seem versus full-priced "on-demand" instances. Spot isn't fully relevant to large customers. You can be nearly certain that when a customer gets to be the size of a Netflix, they 1) need to coordinate with Amazon on capacity planning because you can't just spin up 1/2 a datacenter on a whim, and 2) getting significant volume discounts that bring their usage costs down into the Spot price range anyways. Plus, the first tier of cost cutting is to reclaim hardware that isn't really needed; at my last company, one guy found a bug where as we cycled through boxes we would "forget" about some of them and shutting that down saved $100+k / month (yikes). Once companies burn through that fat, they start looking at Spot.
There's a second, less discussed reason Spot doesn't get used... It's a different API. Think about how this interacts with "organizational inertia" .... Working at a company that continuously spends $XX / hr on EC2 (and coming from a company that spent $XXXX / hr), engineers start instances with the tools they are given. Our Chef deployment doesn't know how to talk to spot. Rightscale (prev place) defaulted to launching on-demand instances. With some quantity of work, I could probably figure out how to make a spot instance, but why bother if my priority is to get role XYZ up and running by tomorrow? I'm not about to engineer a spot-based solution just for my one role and then evangelize why that was a good idea; it's gotta be an org-wide decision. If you read the Pinterest case-study I linked above, you'll notice they talk about migrating their whole deployment over from $54/hr to $20/hr on spot. Reading between the lines, they didn't choose to launch Spot instances 1-by-1; one day, they woke up and made a company-wide decision to "solve the spot problem" and 'migrate' their deployment tools to using Spot by default (probably with support for a flag that keeps their DB instances off Spot). I can't imagine how much money Amazon has made by making Spot a different API instead of being a flag on the normal EC2 API; Hint: it's boatloads .. as in, you could buy a boat and then fill it with cash until it sinks.
So if you are willing to tolerate slightly higher risk and / or you are somewhat price-sensitive ... then, yes, you absolutely can save a crapton of money by running your service under Spot 24/7.
Just make sure you are double-prepared to unexpectedly lose your instance (ie, take backups) .... something you ALREADY need to be prepared for with an "on-demand" instance that doesn't have 100.0% uptime either.
Think of it this way:
Instead of getting something 99.9% reliable, you are getting something 99.5% reliable and paying half-price
(I made those numbers up to convey the idea, but they probably aren't too far off from the truth).
So long as your bid price is above the spot instance market price, you can continue to run whatever spot instances you want, and only pay the market price.
However, when the market price goes above your bid price, you lose your instances. Without any warning. They just terminate. While the spot price rarely spikes, and when it does it tends to come back down again quickly, for many applications the possibility of losing all your instances without warming is unacceptable. You can insulate yourself against that possibility by bidding higher, but then you risk having to pay that much.
TL;DR: If your application is tolerant to sudden termination, then spot instances are great. But there is a risk involved in using them.
I think these answers are slightly missing the point...
You need to select the most appropriate pricing for your workload and architect your solution with this in mind. AWS offers 3 pricing types:
Reserved Instances (low cost, high reliability, but pay up-front)
On-demand instances (highest cost, high reliability, but pay as you go)
Spot Instances (generally lowest cost, but can terminate unexpectedly)
Reserved Instances
- Use these for cost savings on long running / constant / predictable workloads.
On-demand Instances
- Use these for temporary workloads e.g. development / proof of concept / unpredictable workloads that can't be interrupted.
Spot Instances
- Use these for transitory workloads. Ensure applications are designed with this in mind (e.g. maintain state somewhere permanent and support the ability for new instances to resume where previous ones left off).
A useful design pattern can be to have a "pilot light" instance and use auto-scaling to bring spot instances on as required, and with a bit of cunning bring on-demand instances on if spot-instances fail to appear.
TL;DR: Spot Instances are suitable for workloads that can pause and resume, but are not mission critical. They can be subject to extraordinary peaks (e.g. N. California m2.2xlarge spot price is usually $0.11/hr but has sustained peaks of $10.00/hr!).
Or is this a cheap way to get an 24/7 instance while Amazon has a bunch of extra capacity?
Spot on, if your bid price always remains above the spot price.
I couldn't find any other explicit mention of when they will terminate your instance.
I would have assumed it would be when they would require that capacity for customers willing to pay full charges for the instance, but then again, the spot price could technically go above the on-demand price.

Resources