Skip to content

Conversation

@clemblanco
Copy link
Contributor

When environment variables are not set for example:

'sns' => [
    'key' => env('AWS_ACCESS_KEY_ID'),
    'secret' => env('AWS_SECRET_ACCESS_KEY'),
    'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],

which gives

'sns' => [
    'key' => null,
    'secret' => null,
    'region' => 'us-east-1',
],

we should not try to pass an array of empty credentials to the AWS Client like

'credentials' => [
    'key' => null,
    'secret' => null,
],
'region' => 'eu-west-1',

but instead should completely omit the credentials like so

'region' => 'eu-west-1',

This is so we can leverage EC2 Assumed IAM Roles to automatically authenticate with IAM Roles if needed.

@clemblanco clemblanco merged commit e08935c into main Oct 5, 2022
@clemblanco clemblanco deleted the SWP-5671-support-null-aws-credentials-for-assumed-iam-roles branch October 5, 2022 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants