-
Notifications
You must be signed in to change notification settings - Fork 172
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
Instance Profile IAM role does not work #85
Comments
This is the first time I have known anyone to set this up. Is there any way to know that you have set it up this way from a aws powershell function from inside the instance? |
@jamesstringerparsec I'm not precisely sure how to do it in posh. But the logic works like this:
Some very quick testing suggests this would work: if (!(Get-STSCallerIdentity)) {
Write-Output "Prompt for AWS SDK Configuration inside of this block"
} |
Using an instance profile or role would be the right way to do it. We (AWS) do not recommend the use of IAM user credentials except absolutely necessary. And for this use-case specifically, nothing forces the use of keys, as the goal is to configure an EC2 instance. Also, would be cool to provide the recommended IAM policy, it's a simple one, but it would make sure that the people using your script without the required AWS knowledge and best practices in mind, would not create a monster. |
Hi.
I have configured and IAM role with S3 Read Only and attached it to the instance. I run
aws s3 ls
and it shows me all my S3 buckets.But when I run the GPU updater, it always prompts for access keys, and errors out because they're blank.
I suspect the scripts are assuming I will supply access keys before checking the AWS SDK locally to see if it's functional, and then attempting to invoke the SDK with blank strings for credentials. IME this is extremely common ("Local dev" doesn't have an "automatic credentials" mode like instance profiles do), so I thought I'd report it.
The rest of the automation is pretty slick. Thanks for this release.
The text was updated successfully, but these errors were encountered: