pulumi / pulumi-synced-folder

A Pulumi component that synchronizes a local folder to Amazon S3, Azure Blob Storage, or Google Cloud Storage.
Apache License 2.0
3 stars 3 forks source link

Underlying aws command does not respect aws:profile from pulumi config #65

Open sarink opened 5 days ago

sarink commented 5 days ago

What happened?

When running pulumi up and using an aws:config some-org/user from Pulumi.stackname.yml, all commands work fine, except for the synced folder command, which returns

An error occurred (InvalidAccessKeyId) when calling the ListObjectsV2 operation: The AWS Access Key Id you provided does not exist in our records.

Although the access key is in fact valid, and the profile does exist in ~/.aws/credentials the aws s3 ... command that this library uses does not seem to correctly pick up the right profile to use.

Simply renaming the line [some-org/user] in ~/.aws/credentials to [default] fixes the issue.

If you work on multiple projects and/or stacks, this can be very annoying.

Example

Don't have an example, but the above description should allow you to reproduce the error.

Output of pulumi about

Version      3.121.0
Go Version   go1.22.4
Go Compiler  gc

Plugins
KIND      NAME    VERSION
language  nodejs  unknown

Host     
OS       darwin
Version  15.0.1
Arch     arm64

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).