Application in EKS fails to access S3 bucket

10/14/2018

My application running in EKS (AWS Kubernetes) is failing to access an S3 bucket.

I'm getting a 400 Bad Request errors in my app.

I suspect a permission is missing, so for testing I added arn:aws:iam::aws:policy/AmazonS3FullAccess to any role I could find related to my EKS cluster. Still failing.

Using an S3 client from my local computer, I can access the bucket so I suspect I'm missing some configuration.

Any ideas?

-- Eldad Assis
amazon-eks
amazon-s3
kubernetes

1 Answer

10/14/2018

Ok... issue was resolved. I'm leaving this here for future reference.

The problem was a mismatch of the bucket region, us-west-2 and the endpoint I had configured in my application. It should have been s3.us-west-2.amazonaws.com.

The error returned by S3 was not clear.

I hope this helps others.

-- Eldad Assis
Source: StackOverflow