I am trying to configure the "source" parameter in an application configuration file with an elastic beanstalk. The appropriate source is the bz2 file, which I uploaded to the new S3 bucket. As an example, the name of the bucket created is "abc" and the file name is "mysource.tar.bz2". The corresponding line in the configuration file is as follows:
source: /usr/bin/mysource: https:
When I try to deploy the code, an error appears and when checking the log it shows "AccessDenied" for this file.
I created an instance profile (role) in the trust-based AWS IAM console for Amazon EC2 and set up access to the required bucket.
The permission in the role is as follows:
{ "Statement": [ { "Sid": "Stmt13674962346", "Action": [ "s3:*" ], "Effect": "Allow", "Resource": [ "arn:aws:s3:::abc/*" ] } ] }
Even tried to set the resource to *:
"Resource": "*"
But still get an AccessDenied error.
If I change the resolution for the s3 file "mysource.tar.bz2" to make it public, it works.
So, is there a way to make this work without having to publish the S3 file? Are my settings for resolving a role incorrect? Or is there some other way to achieve this?
source share