Elastic Beanstalk deploy action reference - Amazon CodePipeline
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Elastic Beanstalk deploy action reference

Elastic Beanstalk is a platform within Amazon that is used for deploying and scaling web applications. You use an Elastic Beanstalk action to deploy application code to your deployment environment.

Action type

  • Category: Deploy

  • Owner: AWS

  • Provider: ElasticBeanstalk

  • Version: 1

Configuration parameters

ApplicationName

Required: Yes

The name of the application that you created in Elastic Beanstalk.

EnvironmentName

Required: Yes

The name of the environment that you created in Elastic Beanstalk. An environment is a collection of Amazon resources running an application version. Each environment runs only one application version at a time, however, you can run the same application version or different application versions in many environments simultaneously.

Input artifacts

  • Number of artifacts: 1

  • Description: The input artifact for the action.

Output artifacts

  • Number of artifacts: 0

  • Description: Output artifacts do not apply for this action type.

Service role permissions: ElasticBeanstalk deploy action

For Elastic Beanstalk, the following are the minimum permissions needed to create pipelines with an ElasticBeanstalk deploy action.

{ "Effect": "Allow", "Action": [ "elasticbeanstalk:*", "ec2:*", "elasticloadbalancing:*", "autoscaling:*", "cloudwatch:*", "s3:*", "sns:*", "cloudformation:*", "rds:*", "sqs:*", "ecs:*" ], "Resource": "resource_ARN" },
Note

You should replace wildcards in the resource policy with the resources for the account you want to limit access to. For more information about creating a policy that grants least-privilege access, see https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#grant-least-privilege.

Action declaration

YAML
Name: Deploy Actions: - Name: Deploy ActionTypeId: Category: Deploy Owner: AWS Provider: ElasticBeanstalk Version: '1' RunOrder: 1 Configuration: ApplicationName: my-application EnvironmentName: my-environment OutputArtifacts: [] InputArtifacts: - Name: SourceArtifact Region: us-west-2 Namespace: DeployVariables
JSON
{ "Name": "Deploy", "Actions": [ { "Name": "Deploy", "ActionTypeId": { "Category": "Deploy", "Owner": "AWS", "Provider": "ElasticBeanstalk", "Version": "1" }, "RunOrder": 1, "Configuration": { "ApplicationName": "my-application", "EnvironmentName": "my-environment" }, "OutputArtifacts": [], "InputArtifacts": [ { "Name": "SourceArtifact" } ], "Region": "us-west-2", "Namespace": "DeployVariables" } ] },

The following related resources can help you as you work with this action.

  • Deploying a Flask application to Elastic Beanstalk – This tutorial walks you through the creation of your application and environment resources in Elastic Beanstalk using a sample Flask application. You can then build your pipeline with an Elastic Beanstalk deployment action that deploys your application from your source repository to your Elastic Beanstalk environment.