Deploy Stages and Deployment Actions
What you'll learn: How to configure deployment actions in AWS CodePipeline to automatically deliver your built applications to various AWS services.
Understanding Deployment Actions
After your code is built (via a Build Stage), the Deploy Stage is where your application actually goes live. Think of it like the final leg of an assembly line—your product is ready, and now you need to ship it to the right destination. In CodePipeline, deployment actions define how and where your artifacts get deployed.
Core Deployment Action Types
CodePipeline supports deployment to multiple AWS services, each requiring specific configuration:
Amazon ECS Deployment
Deploys Docker containers to ECS clusters. You specify the task definition and service name, and CodeDeploy can handle blue/green deployments with automatic traffic shifting.
AWS Lambda Deployment
Updates Lambda function code from your artifact. Can integrate with CodeDeploy for gradual deployments (canary, linear) to minimize risk.
Amazon S3 Deployment
Extracts and uploads artifacts to an S3 bucket—perfect for static websites or file distribution. You control whether files are extracted or uploaded as-is.
AWS CloudFormation Deployment
Creates or updates infrastructure stacks. You can deploy entire environments using templates stored in your artifacts, enabling true infrastructure-as-code deployments.
Configuration Pattern
Each deployment action requires:
- Action provider (e.g., ECS, Lambda, S3, CloudFormation)
- Input artifacts from previous stages
- Service-specific parameters (cluster names, function names, stack names)
- IAM permissions for CodePipeline to execute the deployment
The Deploy Stage can have multiple actions running in sequence or parallel, allowing complex multi-service deployments.
Key Takeaway: Deploy Stages use service-specific deployment actions to automatically deliver your built artifacts to ECS, Lambda, S3, CloudFormation, or other AWS targets—each configured with appropriate input artifacts and destination parameters.