Catalog / AWS DevOps Essentials Cheatsheet

AWS DevOps Essentials Cheatsheet

A quick reference guide covering essential AWS services and DevOps practices for efficient cloud infrastructure management and deployment.

Core AWS Services for DevOps

Compute Services

EC2 (Elastic Compute Cloud)

Virtual servers in the cloud. Choose from various instance types, operating systems, and software packages.

  • Scalable compute capacity.
  • Pay-as-you-go pricing.
  • Supports Linux, Windows, and macOS.

Lambda

Serverless compute service that runs your code in response to events.

  • No servers to provision or manage.
  • Automatic scaling.
  • Supports multiple languages (Python, Node.js, Java, Go, etc.).

ECS (Elastic Container Service)

Container management service that supports Docker containers.

  • Run containerized applications on AWS.
  • Integrates with other AWS services.
  • Supports both EC2 and Fargate launch types.

EKS (Elastic Kubernetes Service)

Managed Kubernetes service to run containerized applications.

  • Simplifies Kubernetes deployment and management.
  • Highly scalable and reliable.
  • Integrates with AWS networking and security services.

Storage Services

S3 (Simple Storage Service)

Object storage service for storing and retrieving any amount of data.

  • Highly scalable and durable.
  • Supports versioning and lifecycle policies.
  • Used for storing backups, media files, and application data.

EBS (Elastic Block Storage)

Block storage volumes for use with EC2 instances.

  • Provides persistent storage for EC2 instances.
  • Supports different volume types (SSD, HDD).
  • Can be attached and detached from EC2 instances.

EFS (Elastic File System)

Scalable file storage for use with EC2 instances.

  • Provides shared file system access for multiple EC2 instances.
  • Supports NFSv4 protocol.
  • Automatically grows and shrinks as you add or remove files.

Database Services

RDS (Relational Database Service)

Managed relational database service that supports various database engines (MySQL, PostgreSQL, Oracle, SQL Server, MariaDB).

  • Simplifies database administration.
  • Provides automated backups and patching.
  • Supports read replicas for improved read performance.

DynamoDB

NoSQL database service that provides fast and predictable performance at any scale.

  • Fully managed and serverless.
  • Supports key-value and document data models.
  • Ideal for applications with high read and write volumes.

Configuration Management & Automation

Infrastructure as Code (IaC)

Managing and provisioning infrastructure through code, rather than manual processes.
Key benefits:

  • Version control
  • Automation
  • Reproducibility

AWS CloudFormation

CloudFormation

A service that allows you to define and provision AWS infrastructure as code using templates.

  • Supports JSON and YAML formats.
  • Allows for creating, updating, and deleting AWS resources in a predictable way.

Example Template (YAML)

Resources:
  MyEC2Instance:
    Type: AWS::EC2::Instance
    Properties:
      ImageId: ami-0c55b24cd011c7154
      InstanceType: t2.micro

AWS Systems Manager

Systems Manager Overview

Provides a unified interface to manage AWS resources at scale.

  • Automation: Automate operational tasks across AWS resources.
  • Patch Manager: Automate the process of patching operating systems and applications.
  • Run Command: Remotely and securely manage the configuration of managed instances.

Key Features

  • State Manager: Maintain consistent configuration across instances.
  • Inventory: Collect software and hardware inventory information.
  • Session Manager: Securely access EC2 instances without opening inbound ports.

CI/CD Pipelines on AWS

AWS CodePipeline

CodePipeline Overview

A fully managed continuous delivery service that helps you automate your release pipelines for fast and reliable application and infrastructure updates.

  • Automates the build, test, and deploy phases of your release process.
  • Integrates with other AWS services like CodeCommit, CodeBuild, and CodeDeploy.

Key Concepts

  • Pipeline: A workflow that defines the steps for releasing code changes.
  • Stage: A logical unit in a pipeline that performs actions, such as building or testing code.
  • Action: A task performed within a stage, such as running a build command or deploying code.

AWS CodeBuild

CodeBuild Overview

A fully managed build service that compiles source code, runs tests, and produces software packages that are ready to deploy.

  • Scales automatically to meet peak build demands.
  • Supports multiple build environments (e.g., Docker, Java, Python).
  • Integrates with CodePipeline for continuous integration.

Build Specification (buildspec.yml)

A YAML file that defines the build commands and settings for CodeBuild.

version: 0.2
phases:
  install:
    commands:
      - echo "Installing dependencies..."
      - npm install
  build:
    commands:
      - echo "Building the application..."
      - npm run build

AWS CodeDeploy

CodeDeploy Overview

A fully managed deployment service that automates software deployments to various compute services, such as EC2 instances, Lambda functions, and ECS clusters.

  • Supports multiple deployment strategies (e.g., blue/green, rolling).
  • Provides rollback capabilities to revert to previous deployments.
  • Integrates with CodePipeline for continuous deployment.

AppSpec File (appspec.yml)

A YAML file that defines the deployment steps and settings for CodeDeploy.

version: 0.0
os: linux
files:
  - source: /dist
    destination: /var/www/html
hooks:
  AfterInstall:
    - location: scripts/install_dependencies.sh
      timeout: 300
      runas: root

Monitoring and Logging

AWS CloudWatch

CloudWatch Overview

A monitoring and observability service that collects and tracks metrics, logs, and events from AWS resources and applications.

  • Provides real-time insights into the performance of your applications.
  • Allows you to set alarms to trigger actions based on metric thresholds.
  • Integrates with other AWS services for comprehensive monitoring.

Key Features

  • Metrics: Collect numerical data about resource utilization, application performance, and other key indicators.
  • Logs: Aggregate and analyze log data from various sources, such as EC2 instances, Lambda functions, and containerized applications.
  • Alarms: Set thresholds on metrics and trigger notifications or automated actions when the thresholds are breached.

AWS CloudTrail

CloudTrail Overview

A service that records API calls made to AWS services in your account and delivers log files to an S3 bucket.

  • Provides an audit trail of user activity and API usage.
  • Helps you meet compliance and governance requirements.
  • Enables security analysis and troubleshooting.

Key Benefits

  • Security: Monitor and detect unauthorized access or suspicious activity.
  • Compliance: Track API usage to meet regulatory requirements.
  • Operational Troubleshooting: Identify the root cause of operational issues by analyzing API call history.