1. AWS Deployment Services Overview
AWS Elastic Beanstalk: Fully managed PaaS for deploying applications (supports Java, .NET, Python, Node.js, etc.).
Handles capacity provisioning, load balancing, scaling, and application health monitoring.
Supports blue/green deployments (minimizes downtime).
AWS CodeDeploy: Automates application deployments to EC2, Lambda, ECS, and on-premises servers.
Works with in-place and blue/green deployments.
Uses AppSpec file (YAML/JSON) to define deployment steps.
AWS CodeDeploy integrates with EC2, Lambda, ECS (including Fargate for blue/green), and on-premises servers as deployment targets. It also works with CodePipeline, CodeCommit, GitHub, S3, CloudWatch, CloudTrail, IAM, and Systems Manager for full CI/CD and monitoring support.
AWS CodePipeline: CI/CD service for automating release pipelines.
AWS CloudFormation: Infrastructure as Code (IaC) for deploying AWS resources.
AWS SAM (Serverless Application Model): Framework for deploying serverless apps (Lambda, API Gateway, DynamoDB).
2. Deployment Strategies
In-Place Deployment (Rolling Update): Updates instances one by one (downtime possible).
Blue/Green Deployment:
Deploys new version alongside old one, then switches traffic.
Minimizes downtime, allows rollback.
Supported by Elastic Beanstalk, CodeDeploy, Lambda aliase
Canary Deployment: Gradually shifts traffic to new version (e.g., 10% first, then 100%).
Immutable Deployment: Launches new instances instead of updating existing ones (CloudFormation, Elastic Beanstalk).
3. Serverless Deployments
AWS Lambda:
Deploy via ZIP upload, container images, or SAM.
Use versions & aliases for traffic shifting (blue/green).
API Gateway:
Deploy API stages (e.g., dev, prod).
Canary releases via stage variables.
AWS App Runner: Fully managed container deployment (simpler than ECS/EKS).
4. CI/CD Best Practices
AWS CodePipeline: Automates build, test, deploy.
AWS CodeBuild: Builds and tests code.
AWS CodeArtifact: Secure artifact storage for dependencies.
Infrastructure as Code (IaC): Use CloudFormation, CDK, or Terraform for repeatable deployments.
5. Monitoring & Rollback
AWS CloudWatch: Logs and metrics for deployments.
CodeDeploy Rollbacks: Automatic if deployment fails.
Elastic Beanstalk Health Dashboard: Monitors app health.
6. Security & Permissions
IAM Roles: Grant deployment permissions (e.g., CodeDeploy role).
AWS Systems Manager (SSM): Secure parameter storage for deployment configs.