How to download a folder from S3

0

I am trying to download a folder from the s3 storage using the cli, but i am having this error: fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden after configuring the aws cli.

Abbas
asked 7 months ago1104 views
1 Answer
1
Accepted Answer

aws s3 sync command should work. Note that your caller identity requires s3:GetObject permission.

$ aws s3 ls s3://test-bucket/testfolder/
2023-10-16 20:30:19          0 
2023-10-16 20:30:29      13359 template.yml
$ aws s3 sync s3://test-bucket/testfolder testfolder
download: s3://test-bucket/testfolder/template.yml to testfolder/template.yml
$ ls testfolder/
template.yml
profile picture
HS
answered 7 months ago
profile picture
EXPERT
reviewed 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions