Is there a way to configure an S3 bucket/folder/file so that it is not publicly accessible, yet a user-data script can authenticate and obtain access to items in S3?
1 Answers
5
votes
You should be assigning an IAM Role to your EC2 instance that has access to the S3 bucket, and any other AWS resources that the EC2 server needs to access. Then when you use the AWS CLI tool or the AWS SDK it will automatically use the IAM role assigned to the instance.