Is using InstanceProfileCredentialsProvider correct way to connect to AWS S3 from Ec2 instance?
Until my code works, I have set bucket policy too wide open. { "Version": "2012-10-17", "Id": "Policy15", "Statement": [ { "Sid": "Stmt1", "Effect": "Allow", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::bcktName", "arn:aws:s3:::bcktName/*" ] } ] } I am using Elastic BeanStalk which in turn uses AWS Ec2. The Ec2 instance has aws-elasticbeanstalk-ec2-role which was provided FullAccess to S3 (I understand full access is dangerous). I'm using the following java code in my webapp which is deployed to Ec2. AmazonS3 s3Client = AmazonS3ClientBuilder.standard() .withCredentials(new I
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.