
AWS is an infrastructure-as-a-service platform that provdes a wide range of services, many of which are on-demand so you only pay for what you use.
AWS Services
Here are some of the AWS Services I use and am most familiar with:
- EC2 - The Elastic Compute Service lets you create and manage instances for running web servers. You can choose on-demand which charges you hourly or reserved instances which gives you a much cheaper rate in exchange for an commitment of 1 or 3 years.
- S3 - The Simple Storage Service lets you upload and store files in the cloud. This can be a lot cheaper than using disk space.
- CloudFront - CloudFront is a content delivery service that can be used with S3 to distribute your files globally.
- SNS - The Simple Notification Service allows you to send SMS messages, emails, and push notifications programmatically.
- Route53 - This service allows you to use AWS's nameservers to host your DNS settings.
- ELB - With the Elastic Load Balancing you can distribute network traffic across multiple EC2 instances.
- EBS - Elastic Block Storage is used to add a root volume and additional volumes to your EC2 instances
- Lambda - This service provides functions-as-a-service where you can write JavaScript or Python code and have it run without needing to set up a server.
- CloudWatch - The CloudWatch service collects and manages logs. You can use this for monitoring and alerting.
- IAM - This service allows you to create users, define policies, and control all access to your AWS console and resources.
How I Use AWS
The service I use most from AWS is EC2. When creating a new instance I usually choose either Ubuntu or Amazon Linux. When I need to have the instance use other AWS resources like S3 and SNS, I assign a role to the instance which I create in IAM. I have a backup script that creates objects in S3 and this uses the AWS CLI. When I need to connect to S3 from PHP I use the AWS SDK.
When using EC2 it's important to determine the best instance class for your use case. For smaller projects I use the general-purpose T3 instances. With these instances I am assigned CPU credits and if I exceed the limit I am billed extra.
I also use SNS to send automated text messages from the online ordering system I built. These are sent out automatically whenever a customer places an order.
One advantage of using AWS is the many services it offers and being able to keep everything under one account, however, for each AWS service you usually don't have to look far to find a competitor. Instead of using AWS to send emails, I use Mailgun for this purpose because I think it's a much better service for my use case.