AWS deployment reference

6 minute read

CloudBees AWS deployment actions provide inputs for deploying to Amazon EC2, ECS, Elastic Beanstalk, CodeDeploy, and Lambda. Use this reference alongside Deploy to AWS.

EC2 actions

EC2 actions deploy binaries to Amazon EC2 hosts.

ec2-deploy-binary

The cloudbees-io/ec2-deploy-binary action copies files to an Amazon EC2 host and optionally executes a command or script after deployment.

Table 1. Input details
Input name Data type Required? Description

aws-host

String

Yes

The Amazon EC2 host URL.

aws-ssh-key-data

String

Yes

The AWS SSH key data.

aws-user

String

Yes

The AWS user to connect as.

source-location

String

Yes

The source location to copy files from.

destination-ec2-location

String

Yes

The destination location in the Amazon EC2 host.

deploy-command

String

No

The command to execute after deploying to the destination location.

deploy-script

String

No

The script file to execute after deploying to the destination location.

ECS actions

ECS actions render task definitions and deploy to Amazon ECS clusters.

ecs-render-task-definition

The cloudbees-io/ecs-render-task-definition action renders an Amazon ECS task definition by injecting a container image and optional environment variables into an existing definition.

Table 2. Input details
Input name Data type Required? Description

task-definition-name

String

Required only if task-definition is not specified.

The ECS task definition name.

task-definition

String

Required only if task-definition-name is not specified.

The path to the ECS task definition JSON file.

container-name

String

Yes

The container name as defined in the ECS task definition (in containerDefinitions).

image

String

Yes

The container image URL.

environment-variables

JSON

No

Container variables, formatted as JSON data in key/value pairs.

environment-variables-path

String

No

The path of the file that contains the environment variables.

ecs-deploy-task-definition

The cloudbees-io/ecs-deploy-task-definition action deploys to an Amazon ECS cluster using either a service name or a task definition.

Table 3. Input details
Input name Data type Required? Description

task-definition

String

Required only if service is not specified.

The path to the ECS task definition JSON file.

service

String

Required only if task-definition is not specified.

The name of the ECS service to deploy to.

cluster

String

Yes

The name of the ECS cluster to deploy to.

wait-for-service-stability

Boolean

Yes

Whether to wait for the ECS service to reach a stable state after deploying the new task definition. Default value is false. When false, there is no waiting.

wait-for-minutes

String

Yes

The amount of time to wait for the ECS service to reach a stable state, in minutes. The default is 30 minutes, and the maximum time allowed is 6 hours.

force-new-deployment

Boolean

Yes

Whether to force a new service deployment. Default value is false. When false, the new deployment is not forced.

Elastic Beanstalk actions

Elastic Beanstalk actions create application versions and update environments.

aws-elastic-beanstalk-invoke-deployment

The cloudbees-io/aws-elastic-beanstalk-invoke-deployment action creates a new application version from a source bundle and updates an AWS Elastic Beanstalk environment.

Table 4. Input details
Input name Data type Required? Description

application-name

String

Yes

The Elastic Beanstalk application name.

s3-bucket

String

Yes

The S3 bucket name.

s3-key

String

Yes

The S3 key for the source bundle.

version-label

String

Yes

The Elastic Beanstalk application version label to be created from the source bundle.

environment-name

String

Yes

The name of the Elastic Beanstalk environment to be updated.

CodeDeploy actions

CodeDeploy actions trigger deployments and retrieve run information as output.

aws-codedeploy-invoke-deployment

The cloudbees-io/aws-codedeploy-invoke-deployment action triggers an AWS CodeDeploy deployment.

Table 5. Input details
Input name Data type Required? Description

application-name

String

Yes

The AWS CodeDeploy application name.

deployment-config-name

String

Yes

The name of the deployment configuration.

deployment-group-name

String

Yes

The name of the deployment group.

description

String

Yes

Additional information about the deployment.

revision-type

String

Yes

The type of application revision.

auto-rollback-enabled

String

No

The configuration for an automatic rollback, added when a deployment is created.

auto-rollback-events

JSON

No

The event type or types that trigger a rollback.

file-exists-behavior

String

No

How AWS CodeDeploy handles files that already exist in a deployment target location but were not part of the previous successful deployment.

ignore-application-stop-failures

Boolean

No

If an ApplicationStop, BeforeBlockTraffic, or AfterBlockTraffic deployment lifecycle event on an instance fails, and ignore-application-stop-failures: true, the deployment continues to the next deployment lifecycle event.

override-alarm-names

JSON

No

A list of alarms configured for the deployment or deployment group.

override-alarm-enabled

String

No

Indicates whether the alarm configuration is enabled.

appspec-content

String

No

The content of an AppSpec file for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

appspec-sha256

String

No

The SHA256 hash value of the revision content.

string-content

String

No

The content of a string input for an AWS Lambda or Amazon ECS deployment. The content is formatted as JSON or YAML and stored as a RawString.

string-sha256

String

No

The SHA256 hash value of the revision content.

github-commit-id

String

No

The SHA1 commit ID of the GitHub commit that represents the bundled artifacts for the application revision.

github-repository

String

No

The GitHub account and repository pair that stores a reference to the commit that represents the bundled artifacts for the application revision.

s3-bucket

String

No

The name of the Amazon S3 bucket where the application revision is stored.

s3-bundle-type

String

No

The file type of the application revision.

s3-key

String

No

The name of the Amazon S3 object that represents the bundled artifacts for the application revision.

s3-artifact-version

String

No

The specific version of the Amazon S3 object that represents the bundled artifacts for the application revision.

target-auto-scaling-groups

JSON

No

The names of one or more Auto Scaling groups to identify a replacement environment for a blue or green deployment.

target-instance-tag-filters

JSON

No

The tag filter key, type, and value used to identify Amazon EC2 instances in a replacement environment for a blue or green deployment.

target-instance-tag-set

JSON

No

The information about the groups of Amazon EC2 instance tags.

Lambda actions

Lambda actions create, update, and invoke functions in AWS Lambda.

lambda-create-function

The cloudbees-io/lambda-create-function action creates or updates a function in AWS Lambda.

Table 6. Input details
Input name Data type Required? Description

function-name

String

Yes

The AWS Lambda function name.

iam-role-arn

String

Yes

The Identity and Access Management (IAM) name of the function’s execution role, in ARN format.

package-type

String

No

The type of build input artifact. Options are Zip (ZIP file) and Image (container image).

code-image

String

Required only if using an image (package-type: Image).

The code image resource, such as the Amazon ECR repository URI.

code-zip

String

Required only if using a ZIP file (package-type: Zip).

The path to the ZIP file of the code to be uploaded.

handler

String

Required only if using a ZIP file (package-type: Zip).

The method name in uploaded code that Lambda calls to run the function.

runtime

String

Required only if using a ZIP file (package-type: Zip).

The Lambda function runtime.

s3-bucket

String

Required only if using an Amazon S3 bucket.

The Amazon S3 bucket name.

s3-key

String

Required only if using an Amazon S3 bucket.

The Amazon S3 bucket object name.

architectures

JSON string

No

The instruction set architecture that the function supports.

code-signing-config-arn

String

No

The Amazon Resource Name (ARN) for a code-signing configuration.

dead-letter-config

JSON string

No

The location where the Lambda function sends asynchronous events that fail to process.

desc

String

No

The Lambda function description.

dry-run

Boolean

No

Default is false. Enables preview of changes to AWS CLI operations before applying the changes.

environment

JSON string

No

The environment variables accessible from the function code during execution.

ephemeral-storage

JSON string

No

The size of the Lambda function /tmp directory.

file-system-configs

JSON string

No

The Amazon EFS file system connection settings.

image-config

JSON string

No

The container image configuration values that override the container image Dockerfile values.

kms-key-arn

String

No

The ARN of the AWS Key Management Service (KMS) customer-managed key used to encrypt your function’s environment variables.

layers

JSON string

No

The list of function layers to add to the Lambda function’s execution environment.

memory-size

Integer

No

The amount of memory available to the Lambda function at runtime.

publish

Boolean

No

Default is true. Enables the first created version of the Lambda function.

revision-id

String

No

The latest updated revision ID. If specified, the Lambda function is only updated if the revision ID matches the latest updated revision ID.

s3-object-version

String

No

The Amazon S3 bucket object version.

snap-start

JSON string

No

The SnapStart configuration to run the Lambda function with a pre-initialized snapshot.

tags

JSON string

No

The Lambda function tag list.

timeout

Integer

No

The allowed amount of time, in seconds, that a Lambda function runs before it is stopped.

tracing-config

JSON string

No

The AWS X-Ray tracing configuration in the Lambda function. To sample and record incoming requests, enable X-Ray active tracing in the Lambda functions console.

vpc-config

JSON string

No

The VPC security groups and subnets for network connectivity to AWS resources.

lambda-invoke-function

The cloudbees-io/lambda-invoke-function action invokes an existing function in AWS Lambda.

Table 7. Input details
Input name Data type Required? Description

function-name

String

Yes

The AWS Lambda function name.

parameters

JSON

No

The input to provide to your Lambda function, formatted as JSON data in key/value pairs.