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

Trouble creating access keys for a user; no-arg method matching before one-arg method? #1

Closed
lynaghk opened this issue Mar 29, 2013 · 3 comments
Assignees

Comments

@lynaghk
Copy link

lynaghk commented Mar 29, 2013

This looks like a really awesome library---I like that you're using reflection to solve everything at once rather than try to wrap one service at a time.

I'm just diving in but seem to have hit a snag.
Here's a minimal example:

(ns scratch
  (:require amazonica.core)
  (:use amazonica.aws.identitymanagement))

(def creds {:access-key "root-access-key"
            :secret-key "root-secret-key"})

(create-user creds :user-name "db")
;;This works fine; user is created

(create-access-key creds :user-name "db")
;;This returns a new access key, but it's for the root account (i.e., the same account as creds), not for the new "db" account.

The problem is that the :user-name isn't being taken into account, so access keys are created for the same user that owns the creds used to make the request, not the specified new IAM user.

The docs for the underlying CreateAccessKeyRequest object seem to match the get/set method model that you're reflecting against, so I have no idea why it doesn't work.
It seems like the no-argument CreateAccessKeyRequest is matching first.

@ghost ghost assigned mcohen01 Mar 29, 2013
mcohen01 added a commit that referenced this issue Mar 29, 2013
@mcohen01
Copy link
Owner

Exactly right, silly error had us selecting the wrong method. Thanks for reporting this Kevin.

@lynaghk
Copy link
Author

lynaghk commented Mar 29, 2013

Thanks @mcohen01! If you're ever in Portland, Oregon, hit me up for a drink!

@mcohen01
Copy link
Owner

Will do! Would've liked to have been in Portland a week ago :)

mcohen01 pushed a commit that referenced this issue Jan 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants