localstack-extensions icon indicating copy to clipboard operation
localstack-extensions copied to clipboard

Allow aws-replicator to use a profile for multi-account references

Open daveofthedogs opened this issue 2 years ago • 2 comments

For people with multiple aws accounts and a shared aws config/crfedentials file with multiple profiles, replicator does not take a profile name as a parameter for rthe boto3.session being created. Update code to allow for --profile/-p to pass into the session.

daveofthedogs avatar Apr 04 '23 14:04 daveofthedogs

Hi @daveofthedogs , thanks for reporting this issue, and apologies for the long delay here.

The replicator (proxy) extension is configured to use the standard resolution mechanism of the AWS credentials chain, implemented in boto3. You should be able to specify the environment variable AWS_PROFILE to point to a local profile - can you please give that a try?

We'd love to learn more about your use case - can you please share some details about the setup, and how you're planning to use the extension? Also, please feel free to reach out to us directly on Slack (slack.localstack.cloud) - happy to discuss your use case in more detail there.. Thanks!

whummer avatar Aug 07 '23 17:08 whummer

Hi. I missed the comment you added. I have multiple remote profiles, and I wanted to replicate ijnfra from one specific acocunt. It seems that replicator is using my default profile (account) rather than assuming the role of a remote account/profile. I believe I tried to use the AWS_PROFILE var to try to redirect the request properly, and it did not work; however, it has been a pretty long time since II have tried.

daveofthedogs avatar Sep 03 '23 19:09 daveofthedogs