-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Thumbor to access S3 resources using AWS Managed Policies #35
Comments
Similar issues submitted to other Thumbor Docker images: |
I can successfully download an image in the S3 bucket with the AWS CLI from inside the Thumbor container. This command is run right after installing the AWS CLI client, without configuring any AWS profile or credentials thanks to the AWS managed policy that we have set in place: /app # aws s3 cp s3://BUCKET_NAME/img/triforce.png triforce.png
download: s3://BUCKET_NAME/img/triforce.png to ./triforce.png |
@beeyev There is one difference between the config example provided by
This image generates a config file that includes
I think that |
Thank you, I will check it! |
I can now confirm that specifying |
@tschaffter |
I will give it a try today. Thanks! |
@beeyev I get this error when stepping into the container and fetching an image with
I do not specify the environment variable # echo $AWS_STORAGE_REGION_NAME
This Key-Value is not specified in the config file because this PR only prints some KVs if their key is specified.
|
What configuration do you use? Can you provide the values please |
Here are the environment variables passed to the Thumbor container deployed with AWS CDK (dev deployment):
|
@tschaffter |
@beeyev The latest image works! |
Amazing! I will prepare the new release tomorrow |
Thanks so much for fixing that so quickly. |
@tschaffter I updated the docker image with the fix. |
@beeyev Could you please update the image https://hub.docker.com/r/beeyev/thumbor-s3/tags |
@tschaffter I deprecated this image, because full-featured thumbor instance can't work stable on alpine linux.
|
Thank you for developing and maintaining this Thumbor Docker image! It's been a great help to us in our project, and we appreciate all the effort you've put into it.
We encountered an issue while attempting to provide the Docker container on AWS ECS access to an S3 bucket using an AWS managed policy instead of passing AWS credentials directly. When we try to access an image, Thumbor throws an
InvalidAccessKeyId
error. This happens when attempting to fetch an image from within the container.Error Details:
Steps to Reproduce:
InvalidAccessKeyId
error in the logs.Expected Behavior:
Thumbor should successfully access the S3 bucket using the permissions granted by the managed policy, without the need for hardcoded AWS credentials.
Actual Behavior:
Thumbor fails to access the S3 bucket and throws an
InvalidAccessKeyId
error.Suggested Solution:
It seems that Thumbor might not be properly configured to use IAM roles or managed policies. We suggest updating the Thumbor configuration to fully support AWS managed policies for S3 access. This could involve:
Environment:
Additional Context:
This issue prevents us from using the recommended security practices for AWS deployments, where sensitive credentials should not be hardcoded or passed explicitly.
We would appreciate any guidance on how to configure Thumbor to work with AWS managed policies, or if this could be implemented as a feature.
The text was updated successfully, but these errors were encountered: