Amazon S3 (Amazon Simple Storage Service) is onf of famous storage for the Internet. It is designed to make web-scale computing easier for developers. Spring boot with Amazone SDK is a good tool to implement a upload function. Implementing them is very simple with some line of code. When I follow the tutorial (https://medium.com/oril/uploading-files-to-aws-s3-bucket-using-spring-boot-483fcb6f8646) and many others on Internet, it just take some minutes to finish.

Oh, wait. Something went wrong.

Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: xxxx) What did I do wrong? I check step by step follow link: https://aws.amazon.com/premiumsupport/knowledge-center/s3-troubleshoot-403/ and problem found here:

  • Issues in bucket policy or AWS Identity and Access Management (IAM) user policies There is somethings that tutorial did not mention. When you create bucket, a dialog appear ask you about permission.
  • Manage public access control lists (ACLs) for this bucket
  • Block new public ACLs and uploading public objects (Recommended)
  • Remove public access granted through public ACLs (Recommended)
  • Manage public bucket policies for this bucket
  • Block new public bucket policies (Recommended)
  • Block public and cross-account access if bucket has public policies (Recommended) All opinion is set enable, it prevent you access bucket from Amazon SDK.
    We simple uncheck in permission tab in bucket.
    • Manage public access control lists (ACLs) for this bucket
    • Block new public ACLs and uploading public objects (Recommended)

image tooltip here

Problem is disappreared.