Skip to content

AWS S3 Actions

S3 Actions to interact with S3 Buckets

AWS S3 Actions

aws.s3.download

Downloads content from S3 Bucket

Parameters:

bucket - The name of the bucket containing the objects

object_name - Name of the object to be downloaded

save_path - Complete path to saved file (path + filename with file extension)

aws_access_key_id (optional) - AWS access key id for authentication

aws_secret_access_key (optional) - AWS secret access key for authentication

Return:

This action gives no return

aws.s3.list

List files in S3 Bucket

Parameters:

bucket - The name of the bucket containing the objects

prefix - Limits the response to keys that begin with the specified prefix

aws_access_key_id (optional) - AWS access key id for authentication

aws_secret_access_key (optional) - AWS secret access key for authentication

Return:

bucket_keys - List with all Bucket leys found

s3_objects - List with S3 objects

aws.s3.upload

Upload a file in S3 Bucket

Parameters:

bucket - The name of the bucket containing the objects

file_path - Path to the file to be uploaded

aws_access_key_id (optional) - AWS access key id for authentication

aws_secret_access_key (optional) - AWS secret access key for authentication

object_name (optional) - Name of the object to be uploaded

file_mime_type (optional) - Define file MIME type

Return:

This action gives no return

aws.s3.get_client

Create an AWS S3 client to interact with S3 Buckets.
This client is required and used by other S3 actions such as aws.s3.upload, aws.s3.download, and aws.s3.list.

Parameters:

aws_access_key_id (optional) - AWS access key id for authentication. If not provided, the default credentials configured in the environment will be used.

aws_secret_access_key (optional) - AWS secret access key for authentication. If not provided, the default credentials configured in the environment will be used.

Return:

s3_client - Boto3 S3 client object to perform actions on S3.