question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Profile based credentials don't work with credential_process

See original GitHub issue
  • I’m submitting a …

    • 🪲 bug report
    • 🚀 feature request
    • 📚 construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior? If the current behavior is a 🪲bug🪲: Please provide the steps to reproduce

When using --profile (see also #3007), the CLI doesn’t respect credential_process. The profile has to have hardcoded credentials.

  • What is the expected behavior (or behavior of feature suggested)?

credentials_process is respected and invoked the same way other AWS CLI tools do.

  • What is the motivation / use case for changing the behavior or adding this feature?

Parity with AWS CLI.

  • Please tell us about your environment:

    • CDK CLI Version: 0.35.0
    • Module Version: 0.35.0
    • OS: macOS Mojave
    • Language: TypeScript

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:15
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
rclarkcommented, May 17, 2020

https://github.com/aws/aws-cdk/blob/986e2814e072f0334d8470a2d60ea73dcceadfe4/packages/aws-cdk/lib/api/aws-auth/awscli-compatible.ts#L42-L45

I can hack my way to making this work by adding a line here, though there may be other consequences…

    const sources = [
      () => new AWS.EnvironmentCredentials('AWS'),
      () => new AWS.EnvironmentCredentials('AMAZON'),
      () => new AWS.ProcessCredentials({ profile }),
    ];
5reactions
shivlakscommented, Jun 24, 2020

marking as p1 to prioritize a fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the AWS credentials file and credential Profiles
If no credentials or profiles were explicitly provided to the SDK and no credentials were defined in environment variables, but a credentials file...
Read more >
Never put AWS temporary credentials in the ... - Ben Kehoe
So I built a credential process (docs, code) using an SDK that did (boto3), where it reads a profile's AWS SSO configuration, gets...
Read more >
Bash with AWS CLI - unable to locate credentials
The unable to locate credentials error usually occurs when working with different aws profiles and the current terminal ...
Read more >
Resolve "Unable to locate credentials" error in Amazon S3
An "Unable to locate credentials" error indicates that Amazon S3 can't find the credentials to authenticate AWS API calls. To resolve this issue, ......
Read more >
Grant Access to Authentication Settings for Legacy Named ...
For a profile in the original profile user interface, click Edit in the Enabled Named Credential Access section. Add the named credentials that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found