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

Catch more specific exceptions in assume role provider #1515

Merged
merged 1 commit into from
Sep 18, 2015

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Sep 18, 2015

To repro, call an aws command with an explicit --region and
a non-existent profile:

aws ec2 describe-instances --region us-east-1 --profile does-not-exist

The issue was that the assume role provider was catching too general
of an exception so the profile does not exist error was not being
propogated.

There's also a bug in botocore with how we're handling failures
for lazily registered components. This is why we're seeing the
"Unknown component" bug. This will require a separate PR
to botocore.

Before:

$ aws ec2 describe-instances --profile does-not-exist --region us-east-1

Unknown component: credential_provider

After:

$ aws ec2 describe-instances --profile does-not-exist --region us-east-1

The config profile (does-not-exist) could not be found

cc @kyleknap @mtdowling @rayluo

To repro, call an aws command with an explicit ``--region`` and
a non-existent profile:

  aws ec2 describe-instances --region us-east-1 --profile does-not-exist

The issue was that the assume role provider was catching too general
of an exception so the profile does not exist error was not being
propogated.

There's also a bug in botocore with how we're handling failures
for lazily registered components.  This is why we're seeing the
"Unknown component" bug.  This will require a separate PR
to botocore.
@jamesls jamesls added the pr:needs-review This PR needs a review from a Member. label Sep 18, 2015
@kyleknap
Copy link
Contributor

Looks good. 🚢

@mtdowling
Copy link
Member

🚢

@jamesls jamesls merged commit b6cb6e1 into aws:develop Sep 18, 2015
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this pull request Feb 12, 2022
…#1515)

* fix: Move validation of timeout is an int further down the stack

* Fix casting floats to ints

* pywin32 needs to be under 226 to work with virtualenv module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:needs-review This PR needs a review from a Member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants