Cloud technologies are very hot right now, but they can be expensive. What are the best strategies for learning/trying cloud services without racking up a huge bill?
The three major cloud platforms you mentioned have either free trials or a free tier; these all include spending and resource caps which prevent you from spending more than your free trial allows:
Azure offer £150/$200/€170 for the first one month of usage, in addition many of Azure's services have a free or low cost tier:
- App Service Free Tier
- SQL Azure Basic Instance @ £0.005/hour
- Azure Machine Learning Free Tier
- Azure Service Bus @ £0.04/million operations
- Azure Functions @ £0.15 per million executions
If you have a MSDN or Visual Stuido Online account you can also get £100/$150/€130 per month of credit just because you are a subscriber to one of these services.
If you are a startup you may qualify for $120,000 of Azure Credits to host your application through Microsoft's BizSpark programme.
Amazon Web Services
Amazon have a Free Tier which includes:
- 750 Hours of EC2 which equates to about a month of a t2.micro instance
- 750 Amazon RDS
- 5GB S3
- 250,000 AWS IoT Messages
- ... and more
In addition there perpetually free usage allowances on most services:
- AWS Lambda: 1 million free requests a month
- DynamoDB: 25GB Storage
- Amazon SNS: 1 million publishes
- ... and more
Google Compute Platform
Google offer a $300 free trial for 12 months in a similar deal to Amazon. In addition they have free usage tiers for many of their core offerings:
- Google App Engine: 28 instance hours / day
- Google Cloud Database: 1GB Storage
- Google Compute Engine: 1 f1-micro instance / month
- Google Pub/Sub: 10GB messages / month
- Google Cloud Functions: 10 million executions / month
- ... and more
If all of that wasn't enough for you most of the cloud providers will compensate you in credits if you blog about their services in detail, you do have to put in a substantial effort up front and "appear" on their radar by writing blog posts, presenting at meetup and conferences but once they see you they will gladly put $100 a month towards your further learning.
Emulate the cloud on your own hardware
Doing anything substantial with the free tier is challenging. But you probably have some hardware lying around that you can build your own minicloud on. If you need more memory you can dig through your junk drawer. If you build something serious there's some chance you'll decide to buy more hardware, but that is less risky than needing to pay $$$ monthly to AWS to keep your doors open.
LocalStack spins up local emulators of a slew of AWS-style services:
- API Gateway at http://localhost:4567
- Kinesis at http://localhost:4568
- DynamoDB at http://localhost:4569
- DynamoDB Streams at http://localhost:4570
- Elasticsearch at http://localhost:4571
- S3 at http://localhost:4572
- Firehose at http://localhost:4573
- Lambda at http://localhost:4574
- SNS at http://localhost:4575
- SQS at http://localhost:4576
- Redshift at http://localhost:4577
- ES (Elasticsearch Service) at http://localhost:4578
- SES at http://localhost:4579
- Route53 at http://localhost:4580
- CloudFormation at http://localhost:4581
It is completely open-source and it seems like Atlassian is putting a lot of engineering effort into keeping it current.
AppScale can help you emulate the Google cloud:
AppScale is an open-source cloud computing platform that automatically deploys and scales unmodified Google App Engine applications over public and private cloud systems and on-premise clusters. AppScale is modeled on the App Engine APIs and has support for Python, Go, PHP and Java applications.
AppScale is supported and maintained by AppScale Systems, in conjunction with Google.
Eucalyptus has been around for a bit longer and it has free and pay features. It supports emulating EC2, S3, and IAM.
There are quite a few services that offer 'free tiers' of some description to help new developers get started with a cloud platform without the cost you've mentioned.
AWS have quite a generous free tier:
- 1 million free Lambda requests/month
- 25 GB of DynamoDB storage
- 20,000 free requests to the AWS Key Management Service
- 1 million requests to Amazon SQS
- various other services
12 Months Free
- 750 hours of EC2 computing time (t2.micro)
- 5 GB of Amazon S3 storage
- 250,000 messages on AWS IoT
- various others
Azure offer US$200 (or £150) of free credit to use in any way you like within one month (but they expire after a month):
You receive £150 of Azure credits with the Free Trial. The choice is now yours as to how you use your Azure credits. Use them on any Azure service based on your needs, including, Virtual Machines, Websites, Cloud Services, Mobile Services, Storage, SQL Database, Content Delivery Network, HDInsight, Media Services and many more.
Use the pricing calculator to estimate how much you could use with £150 of Azure credits. Here are a few usage scenarios that consume no more than £150 per month:
- Running 2 small Virtual Machine instances for the entire month, or
- Storing 800 GB of data in Storage, or
- Developing and testing a web application using Cloud Services, with 3 web roles and 2 worker roles on medium instances, for 10 hours a day, 5 days a week, or
- Running two S2 SQL databases for the entire month
Google Cloud give 12 months with $300 of credit, and have some services which are 'always free', broadly similar to Amazon's offering.
If you're careful about your timing, you could also use a spot instance (but be careful that you're not paying more than the on-demand price!). Since spot instances can be terminated at any time if you're outbid, they may not be ideal for learning, as you might not be able to use the service exactly when you want it, but they are often far cheaper.
Students can also claim "up to $110 in bonus AWS credits for a total of $75-$150" with the GitHub Student Developer Pack. Perhaps worth checking if your favourite cloud service has similar offers if you're eligible!
Turn things off when you are not using them. Tools like www.parkmycloud.com are very helpful.