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

Cannot get AWS to validate credentials #5116

Closed
psambit9791 opened this issue Jan 15, 2025 · 3 comments
Closed

Cannot get AWS to validate credentials #5116

psambit9791 opened this issue Jan 15, 2025 · 3 comments
Labels
kind/bug Some behavior is incorrect or out of spec needs-repro Needs repro steps before it can be triaged or fixed needs-triage Needs attention from the triage team

Comments

@psambit9791
Copy link

psambit9791 commented Jan 15, 2025

What happened?

Thanks for building this library, it is really useful.

However, I am facing a problem where I cannot seem to be able to validate my AWS credentials in any way.

Pulumi.<stack>.yaml has the following configuration set:

config:
  aws:accessKey:
    secure: <encrypted text>
  aws:secretKey:
    secure: <encrypted text>

If I set an AWS profile as an environment variable, I get the following error:

@ previewing update....
    pulumi:providers:aws default_6_66_3  error: pulumi:providers:aws resource 'default_6_66_3' has a problem: `aws:awsAccessKey` is not a valid configuration key for the aws provider. If the referenced key is not intended for the provider, please choose a different namespace from `aws:`.
    pulumi:providers:aws default_6_66_3  error: pulumi:providers:aws resource 'default_6_66_3' has a problem: `aws:awsSecretKey` is not a valid configuration key for the aws provider. If the referenced key is not intended for the provider, please choose a different namespace from `aws:`.
    pulumi:providers:aws default_6_66_3  2 errors
 +  pulumi:pulumi:Stack auto_instance-abc-abc create 5 messages
Diagnostics:
  pulumi:providers:aws (default_6_66_3):
    error: pulumi:providers:aws resource 'default_6_66_3' has a problem: `aws:awsAccessKey` is not a valid configuration key for the aws provider. If the referenced key is not intended for the provider, please choose a different namespace from `aws:`.
    error: pulumi:providers:aws resource 'default_6_66_3' has a problem: `aws:awsSecretKey` is not a valid configuration key for the aws provider. If the referenced key is not intended for the provider, please choose a different namespace from `aws:`.

If I do not set the AWS profile, this is the error:

 +  pulumi:pulumi:Stack auto_instance-abc-abc create 
 +  pulumi:pulumi:Stack auto_instance-abc-abc create error: Missing required configuration variable 'aws:aws_access_key'
 +  pulumi:pulumi:Stack auto_instance-abc-abc create error: an unhandled error occurred: program exited with non-zero exit code: 1
 +  pulumi:pulumi:Stack auto_instance-abc-abc create 2 errors
Diagnostics:
  pulumi:pulumi:Stack (auto_instance-abc-abc):
    error: Missing required configuration variable 'aws:aws_access_key'
    	please set a value using the command `pulumi config set aws:aws_access_key <value>`
    error: an unhandled error occurred: program exited with non-zero exit code: 1

I have been stuck on this for 2 days now and I cannot seem to fathom what is even going wrong. Stack name is abc-abc for testing to ensure it does not have a conflict with an existing provider.

Example

Details provided in previous section.

Output of pulumi about

CLI
Version 3.145.0
Go Version go1.23.4
Go Compiler gc

Host
OS darwin
Version 15.2
Arch arm64

Backend
Name MacBookPro
URL file://~
User developer
Organizations
Token type personal

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@psambit9791 psambit9791 added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 15, 2025
@justinvp
Copy link
Member

Sorry for the trouble @psambit9791! I personally use the AWS CLI and a shared credentials file to authenticate with AWS, as described at https://www.pulumi.com/registry/packages/aws/installation-configuration/.

I'm going to transfer this issue to the AWS provider repository.

@justinvp justinvp transferred this issue from pulumi/pulumi Jan 20, 2025
@corymhall
Copy link
Contributor

@psambit9791 can you provide us an example program you are using when you get this error message along with the results of pulumi about? I've tried to reproduce this error, but it works fine for me.

Are you using long lived user access keys? What are the permissions that you have attached to them?

@corymhall corymhall added needs-repro Needs repro steps before it can be triaged or fixed awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Jan 21, 2025
@psambit9791
Copy link
Author

Hey @justinvp and @corymhall,

Apologies for this one. There was some internal legacy code deep in our codebase which updated the pulumi configuration before the final build call was happening which was raising the error. We just found this out today - so sorry for the inconvenience this would have caused. Closing this ticket.

Once again, apologies and thank you very much for addressing this at such short notice.
Thanks for working on this amazing framework. :)

@pulumi-bot pulumi-bot added needs-triage Needs attention from the triage team and removed awaiting-feedback Blocked on input from the author labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec needs-repro Needs repro steps before it can be triaged or fixed needs-triage Needs attention from the triage team
Projects
None yet
Development

No branches or pull requests

4 participants