2개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
2
- Create a role for EC2 with a policy including GetObject to the objects in the bucket. The policy looks like this:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1647624289157",
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::mybucket/*"
}
]
}
- Assign the role to the webserver.
- On the webserver, copy the files:
aws s3 cp s3://mybucket . --recursive
- Remove role from webserver & delete the role and policy