Closed joannbrereton closed 6 years ago
In addition to this, is there a way for summon to use the region of the instance it is running on?
@joannbrereton Have you used the session package from the AWS SDK ? The docs suggest it should be possible to use the AWS_PROFILE
env var.
I'm wondering if the SharedConfig is interfering somehow. https://docs.aws.amazon.com/sdk-for-go/api/aws/session/#hdr-Shared_Config_Fields.
@jepperson2 I'll admit I don't know the ins and outs of the session package. It should be possible, I'm just not sure how. The best i can think of is to do the following AWS_REGION=$(some_bash_to_get_the_instance_region)
where inspiration could be take from this StackOverflow post for example
Thanks, @doodlesbykumbi for your quick reply! It should indeed be possible (and easier than how I solved it), but it seems there is currently a limitation with the aws-go-sdk. See my PR for more details.
I'll have a look and give that a try. THank you @doodlesbykumbi
On Thu, Jul 12, 2018 at 6:59 PM Jesse Epperson notifications@github.com wrote:
Thanks, @doodlesbykumbi https://github.com/doodlesbykumbi for your quick reply! It should indeed be possible (and easier than how I solved it), but it seems there is currently a limitation with the aws-go-sdk. See my PR for more details.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cyberark/summon-aws-secrets/issues/4#issuecomment-404676680, or mute the thread https://github.com/notifications/unsubscribe-auth/ADB9vtrRn3vEjvRa6FtjhO4q33ZnUPfYks5uF9TlgaJpZM4U2thC .
-- JoAnn Brereton
@joannbrereton https://github.com/cyberark/summon-aws-secrets/releases/tag/v0.2.0 should fix the MissingRegion
error. Does it resolves the rest of these issues as well?
@apotterri Seems to be working now, Thank you!
Ok, great, glad to hear it. I'll close this issue. Please feel free to open another if you run into further issues.
Thanks for using summon!
Our typical AWS setup involves using a particular profile name that uses a role name, e.g. ~/.aws/config has
Typically, this means that we either attach a --profile myprofile to all our aws-cli commands or more likely
ahead of doing any aws-cli commands.
However, summon with summon-aws-secrets doesn't seem to recognize AWS_PROFILE.
after setting AWS_PROFILE, I get
Note that if I use
that works fine, so my aws cli setup is valid.
Is there a way that I can pass the region , profile and role correctly to this in the case where I maintain multiple profiles?