I'm trying to use S3 as the file service. I configured everything according to the documentation: https://docs.medusajs.com/plugins/file-service/s3
I also followed this DEV post (https://dev.to/yinks/how-to-set-up-an-aws-s3-bucket-for-medusa-s3-file-plugin-4fno), because there was more information about the IAM user mangement and groups of AWS.
So basically the bucket works and is accessible via the url. I also added the 5 env variables
S3_BUCKET_URL=https://foxi-medusa-image-monster.s3.eu-central-1.amazonaws.com
S3_BUCKET_NAME=foxi-medusa-image-monster
S3_BUCKET_REGION=eu-central-1
S3_ACCESS_KEY_ID=<MY_ACCESS_KEY_ID_OF_CREATED_USER>
S3_SECRET_ACCESS_KEY=<MY_SECRET_ACCESS_KEY_OF_CREATED_USER>
But somehow when starting the server and uploading a thumbnail using the admin page for example I get this error:
error: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
Error: connect EHOSTDOWN 169.254.169.254:80 - Local (192.168.0.45:58551)
at internalConnect (node:net:1066:16)
at defaultTriggerAsyncIdScope (node:internal/async_hooks:464:18)
at node:net:1250:9
at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
message: 'Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1',
errno: -64,
code: 'CredentialsError',
syscall: 'connect',
address: '169.254.169.254',
port: 80,
time: 2023-04-11T18:21:45.616Z,
originalError: {
message: 'Could not load credentials from any providers',
errno: -64,
code: 'CredentialsError',
syscall: 'connect',
address: '169.254.169.254',
port: 80,
time: 2023-04-11T18:21:45.616Z,
originalError: {
message: 'EC2 Metadata roleName request returned error',
errno: -64,
code: 'EHOSTDOWN',
syscall: 'connect',
address: '169.254.169.254',
port: 80,
time: 2023-04-11T18:21:45.615Z,
originalError: [Object]
}
}
}