Skip to main content
Copy S3 Objects Actions
Matt Houser avatar
Written by Matt Houser
Updated over a week ago

Description

The Copy S3 Objects action can be used to copy many S3 objects from one S3 bucket to another S3 bucket. Either all objects can be copied, or objects restricted by a specific key prefix. Object key names can optionally be renamed during the copy process.

Test Mode

The Copy S3 Objects action includes a "test mode" as a way of determining which objects will be copied without actually copying the objects. This way, you can fine tune your action without concern for copying the wrong objects.

When test mode is enabled, execute your action normally then check the action logs to verify that only objects that should have been copied would have been copied, and that objects that should not have been copied would not have been copied.

When you are satisfied, disable Test Mode.

Settings

Please see Common Action Settings for a description of settings common to all action types.

Source Bucket Name

Name of the bucket from which the objects will be copied.

Source Prefix

Optional. Only objects with the specified prefix will be copied.

Target Bucket Name

Name of the bucket to which the objects will be copied.

Overwrite Rule

Indicates whether objects will be overwritten if they already exist in the target bucket. Possible options are:

  • Never - Never overwrite objects in the target bucket.

  • Overwrite older objects only - Overwrite objects only if the object in the target bucket is older than the object in the source bucket.

  • Always - Always overwrite objects in the target bucket.

Rename Objects

Indicated whether objects should be renamed when they are copied to the target bucket. Possible options are:

  • Preserve original object key - Keep the source objects original key name.

  • Change prefix - Change the prefix of the object when the object is copied. This is useful if the object should be moved to another "folder" in the bucket.

Target Prefix

Required if "Rename Objects" is set to "Change prefix".
Specifies the new prefix for the copied objects.

Test Mode

Enables and disabled Test Mode (see above).

Amazon Commands Used

The following Amazon AWS commands are used. The access key should have permission to execute all of them.

  • s3:AbortMultipartUpload

  • s3:GetBucketLocation

  • s3:GetObject

  • s3:ListBucket

  • s3:PutObjects

Did this answer your question?