The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Table of Contents

Pipeline: AWS Steps

awaitDeploymentCompletion: Wait for AWS CodeDeploy deployment completion

  • deploymentId : String

awsIdentity: Print and return the AWS identity

    cfInvalidate: Invalidate given paths in CloudFront distribution

    • distribution : String
    • paths : Array / List of String
      • waitForCompletion : boolean (optional)

      cfnCreateChangeSet: Create CloudFormation change set

      • changeSet : String
      • stack : String
      • create : boolean (optional)
      • file : String (optional)
      • keepParams : Array / List of String (optional)
        • notificationARNs : Array / List of String (optional)
          • onFailure : String (optional)
          • params : Object (optional)
          • paramsFile : String (optional)
          • pollInterval : long (optional)
          • roleArn : String (optional)
          • rollbackTimeoutInMinutes : int (optional)
          • rollbackTriggers : Array / List of String (optional)
            • tags : Array / List of String (optional)
              • tagsFile : String (optional)
              • template : String (optional)
              • timeoutInMinutes : long (optional)
              • timeoutInSeconds : long (optional)
              • url : String (optional)

              cfnDelete: Delete CloudFormation stack

              Delete Cloudformation Templates

              • stack : String
                This is the name of the existing Cloudformation template to delete
              • clientRequestToken : String (optional)
              • pollInterval : long (optional)
                How often to check the status of the delete operation in milliseconds. 0 will disable event printing.
              • retainResources : Array / List of String (optional)
                • roleArn : String (optional)
                • timeoutInMinutes : long (optional)

                cfnDeleteStackSet: Delete CloudFormation Stack Set

                • stackSet : String
                • pollInterval : long (optional)

                cfnDescribe: Describe outputs of CloudFormation stack

                • stack : String

                cfnExecuteChangeSet: Execute CloudFormation change set

                • changeSet : String
                • stack : String
                • pollInterval : long (optional)
                • timeoutInMinutes : long (optional)
                • timeoutInSeconds : long (optional)

                cfnExports: Describe CloudFormation global exports

                  cfnUpdate: Create or Update CloudFormation stack

                  • stack : String
                  • create : boolean (optional)
                  • enableTerminationProtection : boolean (optional)
                  • file : String (optional)
                  • keepParams : Array / List of String (optional)
                    • notificationARNs : Array / List of String (optional)
                      • onFailure : String (optional)
                      • params : Object (optional)
                      • paramsFile : String (optional)
                      • pollInterval : long (optional)
                      • roleArn : String (optional)
                      • rollbackTimeoutInMinutes : int (optional)
                      • rollbackTriggers : Array / List of String (optional)
                        • tags : Array / List of String (optional)
                          • tagsFile : String (optional)
                          • template : String (optional)
                          • timeoutInMinutes : long (optional)
                          • timeoutInSeconds : long (optional)
                          • url : String (optional)

                          cfnUpdateStackSet: Create or Update CloudFormation Stack Set

                          • stackSet : String
                          • administratorRoleArn : String (optional)
                          • batchingOptions (optional)
                              Nested Object
                            • regions : boolean
                          • create : boolean (optional)
                          • executionRoleName : String (optional)
                          • file : String (optional)
                          • keepParams : Array / List of String (optional)
                            • notificationARNs : Array / List of String (optional)
                              • onFailure : String (optional)
                              • operationPreferences (optional)
                                  Nested Object
                                • failureToleranceCount : int (optional)
                                • failureTolerancePercentage : int (optional)
                                • maxConcurrentCount : int (optional)
                                • maxConcurrentPercentage : int (optional)
                                • regionOrder : Array / List of String (optional)
                                • params : Object (optional)
                                • paramsFile : String (optional)
                                • pollInterval : long (optional)
                                • rollbackTimeoutInMinutes : int (optional)
                                • rollbackTriggers : Array / List of String (optional)
                                  • tags : Array / List of String (optional)
                                    • tagsFile : String (optional)
                                    • template : String (optional)
                                    • timeoutInMinutes : long (optional)
                                    • timeoutInSeconds : long (optional)
                                    • url : String (optional)

                                    cfnValidate: Validate CloudFormation template

                                    • file : String (optional)
                                    • url : String (optional)

                                    createDeployment: Deploys an application revision through the specified deployment group (AWS CodeDeploy).

                                    • applicationName : String (optional)
                                    • deploymentConfigName : String (optional)
                                    • deploymentGroupName : String (optional)
                                    • description : String (optional)
                                    • fileExistsBehavior : String (optional)
                                    • gitHubCommitId : String (optional)
                                    • gitHubRepository : String (optional)
                                    • ignoreApplicationStopFailures : boolean (optional)
                                    • s3Bucket : String (optional)
                                    • s3BundleType : String (optional)
                                    • s3Key : String (optional)
                                    • waitForCompletion : boolean (optional)

                                    deployAPI: Deploy the given API Gateway API

                                    • api : String
                                    • stage : String
                                    • description : String (optional)
                                    • variables : Array / List of String (optional)

                                      ebCreateApplication: Creates a new Elastic Beanstalk application

                                      • applicationName : String
                                      • description : String (optional)

                                      ebCreateApplicationVersion: Creates a new version for an elastic beanstalk application

                                      • applicationName : String
                                      • versionLabel : String
                                      • s3Bucket : String
                                      • s3Key : String
                                      • description : String (optional)

                                      ebCreateConfigurationTemplate: Creates a new configuration template for an elastic beanstalk application

                                      • applicationName : String
                                      • templateName : String
                                      • description : String (optional)
                                      • environmentId : String (optional)
                                      • solutionStackName : String (optional)
                                      • sourceConfigurationApplication : String (optional)
                                      • sourceConfigurationTemplate : String (optional)

                                      ebCreateEnvironment: Creates a new Elastic Beanstalk environment

                                      • applicationName : String
                                      • environmentName : String
                                      • description : String (optional)
                                      • solutionStackName : String (optional)
                                      • templateName : String (optional)
                                      • updateOnExisting : boolean (optional)
                                      • versionLabel : String (optional)

                                      ebSwapEnvironmentCNAMEs: Swaps the CNAMEs of two elastic beanstalk environments.

                                      • destinationEnvironmentId : String (optional)
                                      • destinationEnvironmentName : String (optional)
                                      • sourceEnvironmentId : String (optional)
                                      • sourceEnvironmentName : String (optional)

                                      ebWaitOnEnvironmentHealth: Waits until the specified environment application becomes available

                                      • applicationName : String
                                      • environmentName : String
                                      • health : String (optional)
                                      • stabilityThreshold : int (optional)

                                      ebWaitOnEnvironmentStatus: Waits until the specified environment becomes available

                                      • applicationName : String
                                      • environmentName : String
                                      • status : String (optional)

                                      ec2ShareAmi: Share an AMI with other accounts

                                      • accountIds : Array / List of String (optional)
                                        • amiId : String (optional)

                                        ecrDeleteImage: Delete ecr images

                                        • imageIds (optional)
                                            Array / List of Nested Object
                                          • imageDigest : String (optional)
                                          • imageTag : String (optional)
                                        • registryId : String (optional)
                                        • repositoryName : String (optional)

                                        ecrListImages: List ECR Images

                                        • filter (optional)
                                            Nested Object
                                          • tagStatus : String (optional)
                                        • registryId : String (optional)
                                        • repositoryName : String (optional)

                                        ecrLogin: Create and return the ECR login string

                                        • email : boolean (optional)
                                        • registryIds : Array / List of String (optional)

                                          ecrSetRepositoryPolicy: Set ECR Repository Policy

                                          • policyText : String (optional)
                                          • registryId : String (optional)
                                          • repositoryName : String (optional)

                                          elbDeregisterInstance: Deregisters the specified instances from the specified load balancer.

                                          • targetGroupARN : String (optional)
                                          • instanceID : String (optional)
                                          • port : int (optional)

                                          elbIsInstanceDeregistered: Registers the specified instances from the specified load balancer.

                                          • targetGroupARN : String (optional)
                                          • instanceID : String (optional)
                                          • port : int (optional)

                                          elbIsInstanceRegistered: Registers the specified instances from the specified load balancer.

                                          • targetGroupARN : String (optional)
                                          • instanceID : String (optional)
                                          • port : int (optional)

                                          elbRegisterInstance: Registers the specified instances from the specified load balancer.

                                          • targetGroupARN : String (optional)
                                          • instanceID : String (optional)
                                          • port : int (optional)

                                          invokeLambda: Invoke a given Lambda function

                                          • functionName : String
                                          • payload : Object (optional)
                                          • payloadAsString : String (optional)
                                          • returnValueAsString : boolean (optional)

                                          lambdaVersionCleanup: Cleanup old lambda versions

                                          • daysAgo : int
                                          • functionName : String (optional)
                                          • stackName : String (optional)

                                          listAWSAccounts: List all AWS accounts of the organization

                                          • parent : String (optional)

                                          s3Copy: Copy file between S3 buckets

                                          Copy file between S3 buckets.

                                          • fromBucket : String
                                            This is the bucket of the existing file.
                                          • fromPath : String
                                            This is the file path in the source bucket. Do not begin with a leading "/".
                                          • toBucket : String
                                            This is the bucket of the new file.
                                          • toPath : String
                                            This is the file path in the destination bucket. Do not begin with a leading "/".
                                          • pathStyleAccessEnabled : boolean (optional)
                                            Enabled/Disable Path-style Access for AWS S3.
                                          • payloadSigningEnabled : boolean (optional)
                                            Enabled/Disable Payload Signing for AWS S3.
                                          • acl (optional)

                                            Canned ACL to add to the new file.

                                            • Private : Specifies the owner is granted Full Control. No one else has access rights. This is the default access control policy for any new buckets or objects.
                                            • PublicRead : Specifies the owner is granted Full Control and to the All Users group grantee is granted Read access.
                                            • PublicReadWrite: Specifies the owner is granted Full Control and to the All Users group grantee is granted Read and Write access.
                                            • AuthenticatedRead: Specifies the owner is granted Full Control and to the Authenticated Users group grantee is granted Read access.
                                            • LogDeliveryWrite: Specifies the owner is granted Full Control and to the Log Delivery group grantee is granted Write access.
                                            • BucketOwnerRead: Specifies the owner of the bucket, but not necessarily the same as the owner of the object, is granted Read access.
                                            • BucketOwnerFullControl: Specifies the owner of the bucket, but not necessarily the same as the owner of the object, is granted Full Control.
                                            • AwsExecRead: Specifies the owner is granted Full Control and Amazon EC2 is granted {@link Permission#Read} access to GET an Amazon Machine Image (AMI) bundle from Amazon S3.

                                            • Values: Private, PublicRead, PublicReadWrite, AuthenticatedRead, LogDeliveryWrite, BucketOwnerRead, BucketOwnerFullControl, AwsExecRead
                                          • cacheControl : String (optional)
                                            Cache control to add to the HTTP request. Sample : "public,max-age=31536000"
                                          • contentDisposition : String (optional)
                                          • contentType : String (optional)
                                          • kmsId : String (optional)
                                          • metadatas : Array / List of String (optional)
                                            Metadatas to add to the new file. Multiple metadatas must be separated with a ';' and name and value separated by a ':'. Sample : "Content-Type:image/svg+xml;Another:AnotherValue"
                                            • sseAlgorithm : String (optional)
                                              Server Side Encryption Algorithm to add to the new file. Sample : "AES256"

                                            s3Delete: Delete file from S3

                                            Delete a file/folder from S3. If the path ends in a "/", then the path will be interpreted to be a folder, and all of its contents will be removed.

                                            • bucket : String
                                              This is the bucket to use.
                                            • path : String

                                              This is the path inside the bucket to delete. If this ends in a "/", then the path will be interpreted to be a folder, and all of its contents will be removed.

                                              Do not begin with a leading "/".

                                            • pathStyleAccessEnabled : boolean (optional)
                                              Enabled/Disable Path-style Access for AWS S3.
                                            • payloadSigningEnabled : boolean (optional)
                                              Enabled/Disable Payload Signing for AWS S3.

                                            s3DoesObjectExist: Check if object exists in S3

                                            Check if object exists in S3 bucket.

                                            • bucket : String
                                              This is the bucket to use.
                                            • path : String
                                              This is the path inside the bucket to use. Do not begin with a leading "/".
                                            • pathStyleAccessEnabled : boolean (optional)
                                              Enabled/Disable Path-style Access for AWS S3.
                                            • payloadSigningEnabled : boolean (optional)
                                              Enabled/Disable Payload Signing for AWS S3.

                                            s3Download: Copy file from S3

                                            Download a file/folder from S3 to the local workspace. Set optional parameter force to true to overwrite any existing files in workspace. If the path ends with a /, then the complete virtual directory will be downloaded.

                                            • file : String
                                              This is the local target file to download into.
                                            • bucket : String
                                              This is the bucket to use.
                                            • pathStyleAccessEnabled : boolean (optional)
                                              Enabled/Disable Path-style Access for AWS S3.
                                            • payloadSigningEnabled : boolean (optional)
                                              Enabled/Disable Payload Signing for AWS S3.
                                            • force : boolean (optional)
                                              Set this to true to overwrite local workspace files.
                                            • path : String (optional)
                                              This is the path inside the bucket to use. Do not begin with a leading "/".

                                            s3FindFiles: Find files in S3

                                            Return a list of all of the files/folders in the bucket. If path is given, then it will be used as the root of the search. Results are returned relative to path; if path is not given, then the results will contain the full S3 path.

                                            The following all ultimately return one item referring to "path/to/my/file.ext"; however, by limiting the scope via path, the results are different.

                                            • files = s3FindFiles bucket: "my-bucket", glob: "path/to/my/file.ext"
                                              // files[0].name = "file.ext"
                                              // files[0].path = "path/to/my/file.ext"
                                            • files = s3FindFiles bucket: "my-bucket", path: "path/to/", glob: "my/file.ext"
                                              // files[0].name = "file.ext"
                                              // files[0].path = "my/file.ext"
                                            • files = s3FindFiles bucket: "my-bucket", path: "path/to/my/", glob: "file.ext"
                                              // files[0].name = "file.ext"
                                              // files[0].path = "file.ext"

                                            List every file in the bucket:

                                            • s3FindFiles bucket: "my-bucket", glob: "**", onlyFiles: true

                                            The return format is identical to that of the findFiles step. This will return an array of FileWrapper instances with the following properties:

                                            • name: the filename portion of the path (for "path/to/my/file.ext", this would be "file.ext")
                                            • path: the full path of the file, relative to the path specified (for path="path/to/", this property of the file "path/to/my/file.ext" would be "my/file.ext")
                                            • directory: true if this is a directory; false otherwise
                                            • length: the length of the file (this is always "0" for directories)
                                            • lastModified: the last modification timestamp, in milliseconds since the Unix epoch (this is always "0" for directories)
                                            When used in a string context, a FileWrapper object returns the value of its path.

                                            • bucket : String
                                              This is the bucket to use.
                                            • pathStyleAccessEnabled : boolean (optional)
                                              Enabled/Disable Path-style Access for AWS S3.
                                            • payloadSigningEnabled : boolean (optional)
                                              Enabled/Disable Payload Signing for AWS S3.
                                            • glob : String (optional)

                                              This is the glob to use to match files/folders. You may use a full file name/path (for example "path/to/file.ext"), but you may also use a glob (for example, "path/t*/file.*").

                                              If left blank, this will perform the equivalent function of "*".

                                              To list absolutely everything, use "**".

                                            • onlyFiles : boolean (optional)
                                              Set this to true to only return actual files. Otherwise, by default, this will return both files and folders.
                                            • path : String (optional)
                                              This is the path inside the bucket to use as the root of the search. Do not begin with a leading "/".

                                            s3PresignURL: Presign file in S3

                                            • bucket : String
                                            • key : String
                                            • httpMethod : String
                                            • durationInSeconds : int
                                            • pathStyleAccessEnabled : boolean (optional)
                                            • payloadSigningEnabled : boolean (optional)

                                            s3Upload: Copy file to S3

                                            Upload a file/folder from the workspace to an S3 bucket. If the file parameter denotes a directory, then the complete directory (including all subfolders) will be uploaded. If text is provided, upload the text as the provided filename in the remote S3 bucket.

                                            • bucket : String
                                              This is the bucket to use.
                                            • pathStyleAccessEnabled : boolean (optional)
                                              Enabled/Disable Path-style Access for AWS S3.
                                            • payloadSigningEnabled : boolean (optional)
                                              Enabled/Disable Payload Signing for AWS S3.
                                            • acl (optional)

                                              Canned ACL to add to the upload request.

                                              • Private : Specifies the owner is granted Full Control. No one else has access rights. This is the default access control policy for any new buckets or objects.
                                              • PublicRead : Specifies the owner is granted Full Control and to the All Users group grantee is granted Read access.
                                              • PublicReadWrite: Specifies the owner is granted Full Control and to the All Users group grantee is granted Read and Write access.
                                              • AuthenticatedRead: Specifies the owner is granted Full Control and to the Authenticated Users group grantee is granted Read access.
                                              • LogDeliveryWrite: Specifies the owner is granted Full Control and to the Log Delivery group grantee is granted Write access.
                                              • BucketOwnerRead: Specifies the owner of the bucket, but not necessarily the same as the owner of the object, is granted Read access.
                                              • BucketOwnerFullControl: Specifies the owner of the bucket, but not necessarily the same as the owner of the object, is granted Full Control.
                                              • AwsExecRead: Specifies the owner is granted Full Control and Amazon EC2 is granted {@link Permission#Read} access to GET an Amazon Machine Image (AMI) bundle from Amazon S3.

                                              • Values: Private, PublicRead, PublicReadWrite, AuthenticatedRead, LogDeliveryWrite, BucketOwnerRead, BucketOwnerFullControl, AwsExecRead
                                            • cacheControl : String (optional)
                                            • contentDisposition : String (optional)
                                            • contentEncoding : String (optional)
                                            • contentType : String (optional)
                                            • excludePathPattern : String (optional)
                                              This is the pattern to use to exclude files Sample : "*.svg"
                                            • file : String (optional)
                                              This is the local file to upload from the workspace.
                                            • includePathPattern : String (optional)
                                              This is the pattern to use to find files to push to S3 Sample : "dist/**"
                                            • kmsId : String (optional)
                                            • metadatas : Array / List of String (optional)
                                              Metadatas to add to push file. Multiple metadatas must be separated with a ';' and name and value separated by a ':'. Sample : "Content-Type:image/svg+xml;Another:AnotherValue"
                                              • path : String (optional)
                                                This is the path inside the bucket to use. Do not begin with a leading "/".
                                              • redirectLocation : String (optional)
                                              • sseAlgorithm : String (optional)
                                                Server Side Encryption Algorithm to add to push file. Sample : "AES256"
                                              • tags : String (optional)
                                                Tags to add to push file. Multiple tags must be separated with a ', ' and name and value separated by a ':'. Sample : "[tag1:value1, tag2:value2]"
                                              • text : String (optional)
                                                This is the text to be copied up to S3.
                                              • verbose : boolean (optional)
                                              • workingDir : String (optional)
                                                Working directories for s3Upload plugin Sample : "dist"

                                              setAccountAlias: Set the AWS account alias

                                              The setAccountAlias step set the given name as AWS account alias.

                                              • name : String
                                                Name to use as account alias.

                                              snsPublish: Publish notification to SNS

                                              • topicArn : String
                                              • subject : String
                                              • message : String
                                              • messageAttributes (optional)
                                                • Type: java.util.Map<java.lang.String, java.lang.String>

                                              updateIdP: Update thirdparty Identity Provider

                                              • name : String
                                              • metadata : String

                                              updateTrustPolicy: Update trust policy of IAM roles

                                              • roleName : String
                                              • policyFile : String

                                              withAWS: set AWS settings for nested block

                                              The withAWS step provides authorization for the nested steps. You can provide region and profile information or let Jenkins assume a role in another or the same AWS account. You can mix all parameters in one withAWS block.

                                              • credentials : String (optional)
                                                Use standard Jenkins UsernamePassword credentials. Note: the username should be your Access Key ID, and the password should be the Secret Access Key.
                                              • duration : int (optional)
                                              • endpointUrl : String (optional)
                                                The AWS endpoint-url.
                                              • externalId : String (optional)
                                                (optional) The external ID.
                                              • federatedUserId : String (optional)
                                                (optional) The federated user ID. It generates a set of temporary credentials and allows you to push a federated user id into cloud trail for auditing.
                                              • iamMfaToken : String (optional)
                                              • policy : String (optional)
                                                (optional) An additional policy that is to be combined with the policy associated with the role.
                                              • principalArn : String (optional)
                                                Account principal ARN Note: Only use when pass a samlAssertion parameter
                                              • profile : String (optional)
                                                Use this profile information from ~/.aws/config.
                                              • region : String (optional)
                                                The AWS region.
                                              • role : String (optional)
                                                Assume role information (Role Account is optional; it uses current account as default, External ID is optional).
                                              • roleAccount : String (optional)
                                                (optional) The account to use. This uses current account by default.
                                              • roleSessionName : String (optional)
                                              • samlAssertion : String (optional)
                                                SAML assertion, given by your IdP. Must be used with role, roleAccount and principalArn parameters Note: Will use this SAML assertion to make a assumeRole request to AWS for authentication. Any credentials passed will be ignored.
                                              • useNode : boolean (optional)

                                              Was this page helpful?

                                              Please submit your feedback about this page through this quick form.

                                              Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

                                                  


                                              See existing feedback here.