Documentation for Tasks for AWS 2.13 – other releases are available in the Tasks for AWS Documentation Directory.
View

Unknown macro: {spacejump}

or visit the current documentation home.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

You can use the Amazon S3 Object task to upload, download, delete or copy Amazon Simple Storage Service (Amazon S3) (files); in particular, you can upload your Bamboo job's build artifacts or select local files and directories (optionally via Ant Patterns) - when addressing S3 objects (files), it matches those by key prefix, which allows to operate on multiple objects at once (virtual directories resp. folder hierarchies).

Configuration

To configure an Amazon S3 Object task:

  1. Navigate to the Tasks configuration tab for the job (this will be the default job if creating a new plan).
  2. Click the name of an existing Amazon S3 Object task, or click Add Task and then Amazon S3 Object Task to create a new task.
  3. Complete the following settings:

    1. Common to all tasks

       Click here to expand...
      Task Description (Optional) Identify the purpose of the task.
      Disable this task

      Check, or clear, to selectively run this task.

      Action

      Each task supports one or more actions depending on the target AWS resource. Select the desired action and configure the action specific parameters below.

      RegionSelect the desired AWS Region. Alternatively, select [Use region variable ...] to supply the region dynamically via Bamboo variables (needs to be a region code such as ap-southeast-2) - refer to How to parametrize the AWS region via a Bamboo variable for details.
      ...Configure task/action specific parameters, see below ...
      AWS Security Credentials
      SourceSelect the source for the required AWS Security Credentials - can be either Inline, an IAM Role for EC2 or a shared Identity Federation for AWS Connector.
      Connector(Conditional) Select the shared Identity Federation for AWS Connector. Alternatively, select [Use connector variable ...] to supply the connector dynamically via Bamboo variables (needs to be a connector id such as f24e81bc-7aff-42db-86a2-7cf82e24d871) - refer to How to parametrize the AWS connector via a Bamboo variable for details.

    2. Actions supported by this task:

      Most features offered by S3 are available by means of specifying additional Metadata fragments.

      Upload

       
      Artifact

      Select the artifact you want to upload.

      Source Local Path

      Specify the local path (relative to the Bamboo working directory) to the files you want to upload. Use commas to separate files and directories. You can also use:

      Target Bucket Name

      Specify the name of the S3 bucket where you want the files to be uploaded to.

      Target Object Key Prefix (Virtual Directory)
      (Optional) Specify the S3 object key prefix you want the uploaded files to gain in the target bucket.
      Metadata Configuration

      (Optional) Specify additional metadata in JSON format. Insert fragments from the inline Examples dialog to get started.

      • Refer to PUT Object and PUT Object - Copy for available metadata options and values. For example:

        •  – Declares file(s) to be compressed css.
        • Activate server-side encryption and reduced redundancy storage.
        • Redirect request to another location, if the bucket is configured as a website.
        • Sets a one hour maximum age.
        •  – Grant public read access.
        •  – Replace source metadata with new values.
          • (warning) Note that this has somewhat tricky implications, please see the PUT Object - Copy documentation for details.
      Generated Variables
      Creating resource variables for uploaded object 'prefix/taws-tst-object-4B.txt':
      ... custom.aws.s3.object.first.BucketName: taws-tst-target-us-east-1
      ... custom.aws.s3.object.first.ETag: 1dafad37f6d9e169248bacb8485fd9cc
      ... custom.aws.s3.object.first.ObjectKey: prefix/taws-tst-object-4B.txt
      ... custom.aws.s3.object.first.VersionId: null
      

      Download

       
      Source Bucket Name

      Specify the name of the S3 bucket where you want the objects to be downloaded from.

      Source Object Key Prefix
      Specify the key prefix of the S3 objects you want to download from the source bucket.
      Target Local Path(Optional) Specify the local path (relative to the working directory) where the objects will be downloaded to.
      Generated VariablesN/A

      Delete

       
      Source Bucket Name

      see Download above

      Source Object Key Prefix
      see Download above
      Generated VariablesN/A

      Copy

       
      Source Bucket Name

      see Download above

      Source Object Key Prefix
      see Download above
      Target Bucket Name

      see Upload above

      Target Object Key Prefix (Virtual Directory)
      see Upload above
      Metadata Configurationsee Upload above
      Generated Variables
      Creating resource variables for copied object 'taws-tst-object-4B.a.txt':
      ... custom.aws.s3.object.first.BucketName: taws-tst-target-us-east-1
      ... custom.aws.s3.object.first.ETag: 1dafad37f6d9e169248bacb8485fd9cc
      ... custom.aws.s3.object.first.ObjectKey: taws-tst-object-4B.a.txt
      ... custom.aws.s3.object.first.VersionId: null
      

Variables

All tasks support Bamboo Variable Substitution/Definition - this task's actions generate variables as follows:

A task's generated variables might get amended with respective AWS API additions over time - a live build log will always provide the most current variable shape accordingly

Frequently Asked Questions (FAQ)

 

 

  • No labels