Skip to main content

Copy Object

AutomatR.AWS.Activities.CopyObject

The "Copy Object" activity in AutomatR is part of the AWS S3 (Simple Storage Service) activities package, allowing automation processes to copy an object from one S3 bucket to another within Amazon Web Services (AWS). This activity streamlines object management tasks in S3, enhancing the efficiency of automation workflows.

Properties

NameDescription
Input
Access Key IDProvides the encrypted access key ID for your AWS account, enabling connection to the Amazon S3 service. String variables containing the access key ID.
Secret Access KeyProvides the encrypted secret access key for your AWS account, enabling connection to the Amazon S3 service. String variables containing the secret access key.
RegionSpecifies the AWS region associated with the source bucket, which is needed for copying the object. Use the RegionEndpoint enumeration to set the region.
Source Bucket NameSpecifies the name of the bucket from which the object needs to be copied. String variables containing the source bucket name.
Source KeySpecifies the name of the object that needs to be copied. String variables containing the source object key.
Destination Bucket NameSpecifies the name of the bucket where the copied object should be placed. String variables containing the destination bucket name.
Destination KeySpecifies the desired name for the copied object. String variables containing the destination object key.
OverwriteEnables an option to overwrite the destination object if it already exists. Boolean variables to control this option.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variable or argument containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Copy Object" activity. Useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the wait time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ResultOutputs the result of the "Copy Object" operation, indicating whether the object copy was successful or encountered errors. Variables of relevant types (e.g., Boolean variables) to store the operation result.

How to use:

  1. Drag and drop the "Copy Object" activity onto the workflow.
  2. Configure the properties by providing the required inputs, such as access key ID, secret access key, region, source bucket name, source object key, destination bucket name, destination object key, and the overwrite option.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to copy the specified object within AWS S3.

Example: Consider an example where the "Copy Object" activity is used to copy an object named "file.txt" from one S3 bucket to another:

Copy Object:
Display Name: "Copy File Object"
Access Key ID: "**************"
Secret Access Key: "**************"
Region: "us-east-1"
Source Bucket Name: "source-bucket"
Source Key: "file.txt"
Destination Bucket Name: "destination-bucket"
Destination Key: "new-file.txt"
Overwrite: true
Result: isCopySuccessful

In this example, the activity attempts to copy the "file.txt" object from the "source-bucket" to the "destination-bucket" with a new name "new-file.txt". The result of the operation (success or failure) is stored in the Boolean variable "isCopySuccessful" for further handling in the workflow.