Overview
Quickly and seamlessly move a file within an S3 bucket to another bucket or folder, or rename a file within an S3 bucket.
Variables
|
Name |
Reference |
Type |
Required |
Default |
Options |
Description |
|---|---|---|---|---|---|---|
|
S3 Source Bucket Name |
S3_SOURCE_BUCKET_NAME |
Alphanumeric |
✅ |
- |
- |
Name of the S3 bucket where the file is located |
|
S3 Source Folder Name |
S3_SOURCE_FOLDER_NAME |
Alphanumeric |
➖ |
- |
- |
Name of the folder within the bucket where the source file is located. If left blank, the file will be scanned for in the root directory |
|
S3 Original File Name Match Type |
S3_FILE_MATCH_TYPE |
Select |
✅ |
|
Exact Match: Regex Match: |
Determines if the text in "S3 Original File Name" will look for one file with exact match, or multiple files using regex. |
|
S3 Original File Name |
S3_SOURCE_FILE_NAME |
Alphanumeric |
✅ |
- |
- |
The name of the file desired to move. If regex match is selected, then it is the pattern to match files |
|
S3 Destination Bucket Name |
S3_DESTINATION_BUCKET_NAME |
Alphanumeric |
✅ |
- |
- |
The name of the destination S3 Bucket |
|
S3 Destination Folder Name |
S3_DESTINATION_FOLDER_NAME |
Alphanumeric |
➖ |
- |
- |
The folder in S3 in which you would like to move the file. If left blank, the file will be moved to the root directory |
|
S3 New File Name |
S3_DESTINATION_FILE_NAME |
Alphanumeric |
➖ |
- |
- |
The name of the file once it is moved |
|
Default Region |
AWS_DEFAULT_REGION |
Select |
✅ |
|
|
The AWS region for the S3 bucket and IAM user. |
|
Access Key ID |
AWS_ACCESS_KEY_ID |
Password |
✅ |
- |
- |
The access key ID for programmatic IAM user used to download the file. See Authorization documentation for more information. |
|
Secret Access Key |
AWS_SECRET_ACCESS_KEY |
Password |
✅ |
- |
- |
The secret access key for programmatic IAM user used to download the file. See Authorization documentation for more information. |
YAML
Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.
source:
blueprint: Amazon S3 - Move or Rename Files
inputs:
S3_SOURCE_BUCKET_NAME: null ## REQUIRED
S3_SOURCE_FOLDER_NAME: null
S3_FILE_MATCH_TYPE: exact_match ## REQUIRED
S3_SOURCE_FILE_NAME: null ## REQUIRED
S3_DESTINATION_BUCKET_NAME: null ## REQUIRED
S3_DESTINATION_FOLDER_NAME: null
S3_DESTINATION_FILE_NAME: null
AWS_DEFAULT_REGION: us-east-2 ## REQUIRED
AWS_ACCESS_KEY_ID: null ## REQUIRED
AWS_SECRET_ACCESS_KEY: null ## REQUIRED
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '101'
- '102'
- '103'
- '104'
- '105'
- '106'
- '107'
- '202'
- '203'
- '249'