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

Fallback to default AWS credential chain #7952

Merged
merged 2 commits into from
Jul 30, 2023
Merged

Conversation

ryzr
Copy link
Contributor

@ryzr ryzr commented Sep 26, 2022

By setting the S3 Client credentials to undefined, the AWS SDK will fallback to a default credential chain, attempting to load credentials from the instance profile, .ini file, environment variables etc:
https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html

This allows users to follow AWS best practices by using temporary credentials:
https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html

To achieve this, I've made the s3Storage.accessKeyId and s3Storage.secretAccessKey configuration items optional.

@changeset-bot

This comment was marked as resolved.

@vercel

This comment was marked as resolved.

@codesandbox-ci

This comment was marked as resolved.

@vercel vercel bot temporarily deployed to Preview September 26, 2022 04:17 Inactive
@dcousens
Copy link
Member

The changes LGTM, but I don't know if we want to commit to supporting default credential providers.

We are contemplating moving away from the AWS SDK to minimize the dependency requirements.

@vercel vercel bot temporarily deployed to Preview September 26, 2022 07:17 Inactive
@dcousens dcousens force-pushed the main branch 3 times, most recently from 26e4ead to f2ca4d1 Compare October 18, 2022 22:51
@dcousens

This comment was marked as outdated.

@dcousens dcousens assigned dcousens and unassigned dcousens Jun 8, 2023
@dcousens dcousens changed the title feat: fallback to default AWS credential chain Fallback to default AWS credential chain Jul 30, 2023
@dcousens dcousens self-assigned this Jul 30, 2023
@dcousens dcousens self-requested a review July 30, 2023 23:52
@dcousens dcousens enabled auto-merge (squash) July 30, 2023 23:52
@dcousens dcousens merged commit 935d9fa into keystonejs:main Jul 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants