Skip to content
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

[SWP-5671] Support null AWS credentials for assumed IAM roles #18

Merged

Conversation

clemblanco
Copy link
Contributor

When environment variables are not set for example:

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

which gives

'kinesis' => [
    '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 2677288 into master Oct 5, 2022
@clemblanco clemblanco deleted the support-null-aws-credentials-for-assumed-iam-roles branch October 5, 2022 12:26
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.

2 participants