Compute Services
Notes about AWS Compute Services
tip
You can download these notes as pdf from here.
1. Amazon EC2 (Elastic Compute Cloud)
- Instance Types: Different types are optimized for various use cases (e.g., general-purpose, compute-optimized, memory-optimized, storage-optimized, and accelerated computing).
- Instance Lifecycle: Launch, stop, start, reboot, terminate. Understand how to manage the state of instances.
- Elastic Block Store (EBS): Persistent block storage for EC2 instances. Types include General Purpose SSD (gp2/gp3), Provisioned IOPS SSD (io1/io2), Throughput Optimized HDD (st1), and Cold HDD (sc1).
- Security Groups: Virtual firewalls controlling inbound and outbound traffic to instances.
- Elastic IPs: Static IP addresses that can be remapped.
- Auto Scaling: Automatically adjusts the number of EC2 instances based on demand.
- Elastic Load Balancing (ELB): Distributes incoming application traffic across multiple targets, such as EC2 instances.
2. AWS Lambda
- Serverless Computing: Run code without provisioning or managing servers.
- Function: A Lambda function is a compute service where you can upload your code and the service can run the code on your behalf.
- Triggers: Can be triggered by AWS services like S3, DynamoDB, Kinesis, SNS, or through API Gateway.
- Event-Driven: Executes in response to events.
- Concurrency: Scales automatically with the number of requests. Understand concurrency limits and provisioned concurrency.
3. AWS Elastic Beanstalk
- PaaS (Platform as a Service): Simplifies application deployment by handling infrastructure details like load balancing, scaling, and monitoring.
- Supported Platforms: Various platforms, including Java, .NET, PHP, Node.js, Python, Ruby, Go, and Docker.
- Environment: Consists of all the resources that AWS Elastic Beanstalk provisions, configures, and manages, including EC2 instances, an auto-scaling group, and an ELB.
- Configuration Files:
.ebextensions
for environment customization.
4. AWS Serverless Application Model (AWS SAM)
- Framework for Building Serverless Applications: Provides a simplified way to define and deploy serverless applications.
- SAM Templates: YAML templates used to define serverless applications, including AWS Lambda functions, API Gateway APIs, DynamoDB tables, and more.
- Local Testing and Debugging: Supports local testing and debugging of serverless applications using the SAM CLI.
- Built-In Best Practices: Enforces best practices such as least privilege and secure environment variables.
- Integration with CI/CD Pipelines: Easily integrates with AWS CodePipeline, Jenkins, GitLab, and other CI/CD tools for automated deployment.
Key Concepts and Best Practices
- Elasticity and Scalability: Design applications to take advantage of AWS's elastic and scalable infrastructure.
- Security: Use IAM roles, security groups, and encryption to secure compute resources.
- Cost Optimization: Use Spot Instances and Reserved Instances to reduce costs.
- Monitoring and Logging: Use CloudWatch for monitoring, alarms, and logging to track and respond to operational issues.
- Infrastructure as Code (IaC): Use AWS CloudFormation or other IaC tools to automate the provisioning and management of compute resources.
Every Bit of Support Helps!
If you have enjoyed this post, please consider buying me a coffee ☕ to help me keep writing!