1

I am trying to copy data from one S3 bucket to another in same account using lambda python. Can anyone help.

2

1 Answer 1

3

Use copy_object():

response = client.copy_object(
    Bucket='string',
    Key='string',
    CopySource='string' or {'Bucket': 'string', 'Key': 'string', 'VersionId': 'string'},
    ...
)

Specify the destination in Bucket and Key, then specify the source in CopySource.

The easiest format for CopySource is: source-bucket/folder/foo.txt

Let us know if you are unfamiliar with writing Lambda functions or using boto3.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.