Reputation: 151
I am new to AWS. I have developed spring boot application to upload files in S3 bucket.
I have created IAM user and assign AmazonS3FullAccess. I am using that user accessKey and accessSecret in my spring boot application to upload file and its working fine in my localhost but its not working in AWS Elastic BeanStalk instance. I am getting permission denied exception message.
Upvotes: 0
Views: 1203
Reputation: 1226
All I did was to add permission policy to my elastic beanstalk role.
Upvotes: 0
Reputation: 3044
In the Configuration of your Elastic Beanstalk application, in the Security section, there should be an IAM instance profile configured.
Once you've identified the role that it is using, you need to open the Identity and Access Management (IAM) console, navigate to the list of Roles, find the role, and add a new policy to it. The easiest solution is to add an inline policy. Give it permissions to upload files to the bucket and it should start working. There shouldn't be a need to restart the server.
Upvotes: 1