-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
AWS credentials using credential_process #812
Comments
Hmm I wonder if the Go SDK from AWS even supports it, I've never seen that option but I'll try to take a look soon and see if they support it! |
Yep! It was adding 2018, if you can believe it, and I did check to make sure aws/aws-sdk-go@275272f |
I haven't dug deep enough to create a PR for this, but it looks like a fairly minimal change to enable the shared config by default. When you're building an AWS SDK session now, you use something like this: s := session.New(aws.NewConfig().WithRegion(region)) But something like this (untested) snippet should load all of the shared config stuff automatically: sess := session.Must(session.NewSessionWithOptions(session.Options{
Config: aws.Config{Region: aws.String(region)},
SharedConfigState: session.SharedConfigEnable,
})) The big behavioural change here is that using Just FYI, the documentation says |
Description
If
~/.aws/credentials
uses credential_process,up
will fail with a "Cannot find credentials" error.Steps to Reproduce
up.json
~/.aws/credentials
Try to deploy:
❯ up build: 5 files, 12 MB (545ms) Error: Cannot find credentials, visit https://apex.sh/docs/up/credentials/ for help.
Workaround
Setting the environment variable
AWS_SDK_LOAD_CONFIG
will instruct the underlying AWS SDK to use Shared Config Fields (thus executing the customcredential_process
).I'm not sure there's much you could do in your AWS session implementation beyond force-enable Shared Config support. Opening this as mostly as a reference for anyone who comes across the error with this configuration.
The text was updated successfully, but these errors were encountered: