EC2 Deploy
Type: DEVRAMPS:EC2:DEPLOY
Category: deploy
Version: 1.0.0
Description
Deploy to a single EC2 instance via SSH or SSM.
Deploys an artifact to a specific EC2 instance using either SSH or AWS Systems Manager (SSM). Downloads the artifact to the instance and executes the specified deployment commands. Useful for legacy applications or instances not managed by Auto Scaling Groups.
Parameters
Required Parameters
| Parameter | Type | Description |
|---|---|---|
instance_id | string | The EC2 instance ID to deploy to. |
artifact_name | string | The name of the artifact to deploy. |
deployment_method | enum: SSH | SSM | Method to connect to the instance (SSH or SSM). |
commands | array<string> | Shell commands to execute on the instance for deployment. |
Optional Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
account_id | string | - | The AWS account ID where the EC2 instance is located. Defaults to stage account. |
region | string | - | The AWS region. Defaults to stage region. |
timeout | integer | 30 | Deployment timeout in minutes. |
Example Usage
- type: DEVRAMPS:EC2:DEPLOY
name: Deploy to Web Server
params:
instance_id: i-0123456789abcdef0
artifact_name: app-bundle
deployment_method: SSM
commands:
- sudo systemctl stop myapp
- tar -xzf /tmp/artifact.tar.gz -C /opt/myapp
- sudo systemctl start myapp
timeout: 15