Aws s3 plugin connect with IAM ROLE AWS

Hello everyone,

In my organization, we are prohibited from using programmatic keys,
that is to say

accessKeyId: env(“AWS_ACCESS_KEY_ID”),
secretAccessKey: env(“AWS_ACCESS_SECRET”),

printed in the code, so I would like to know if anyone knows how I can connect with the @strapi/provider-upload-aws-s3 plugin
so that they occupy an IAM ROLE or if someone has experience that can guide me for this part

I’ll stay tuned, thank you.

1 Like

@Boegie19 @Paul_Brats

I think this is more a question for @DMehaffy

Hello there !

If you are hosting on EC2, you can directly use instance-profile permissions to access S3.
You only need to remove AccessKey and SecretKey IDs from the provider configuration block, it should then inherits the permissions from the role attached to the EC2

I hope it helped :slight_smile: