Amplify-cli: [Feature Request] `amplify configure` should work for existing IAM user

Created on 5 Jul 2020  路  12Comments  路  Source: aws-amplify/amplify-cli

Is your feature request related to a problem? Please describe.

when cloning down an existing project and running amplify configure, i would like to use an existing IAM user, but the CLI doesnt let me:

image

i have to go lookup an existing iam user and then put it in, then it send me back to the console...

then i have to go and get an accessKeyId and secretAccessKey - this is secret so i guess this is irreducible and i have to create a new one regardless.

Describe the solution you'd like

amplify configure should:

  • be aware if i already have an existing IAM user locally configured, and tell me that i am already configured.
  • offer a list of existing IAM users I have that I can reuse

Describe alternatives you've considered
do nothing

enhancement

Most helpful comment

thanks, i am aware. i am pointing out that amplify configure is overoptimized for the new user experience because it always sends you out to create a new IAM user. i should not have to watch a youtube video to understand that a CLI command named "configure" means "create a new IAM user" only.

All 12 comments

amplify init initializes your project and provides a list of profiles to use. Whereas amplify configure sets up an IAM profile. Is there a need to use configure instead of init here?

well that points to some confusion @dabit3 and i had about what configure actually does then. the naming is a little confusing if it is only used to create an IAM user.

just to be clear - there is no globally configured IAM profile? all profiles are local? and amplify configure lets you create and switch to a new profile? am i reading all that right?

happy to do a meeting internally to clear this up

You can see what amplify configure does quite explicitly in this video from @dabit3 : https://youtu.be/fWbM5DLh25U

On the other hand, amplify help says this about configure:
configure Configures the attributes of your project for amplify-cli, such as switching front-end framework and adding/removing cloud-provider plugins.

thanks, i am aware. i am pointing out that amplify configure is overoptimized for the new user experience because it always sends you out to create a new IAM user. i should not have to watch a youtube video to understand that a CLI command named "configure" means "create a new IAM user" only.

@sw-yx - totally agree. My point was simply that the output from amplify help is incorrect and rather misleading.

+1

+1

+1, is there no way to bypass this? Without configure with existing user it's near impossible/infuriating to use vscode remote devcontainers in an amplify project

Yeah this hit me on the head pretty bad too when I had to reconfigure my existing stack, I really thought that configure meant configure, and not create and configure

I don't know if this counts as a solution, but if you use "amplify configure" and change the username to an existing user instead of the default, it works. When it redirects you to the console to create a new user, you can just ignore it and use the credentials from the existing user instead.

yup @ObinnaAka I get that. but this developer experience is far from good enough and that's what I'm holding the team accountable for

Oh yes, in that case I very much agree. I've spent hours trying to fix problems that could have been solved with proper naming (e.g. this one). The documentation is good at times, but could definitely be much better.

Was this page helpful?
0 / 5 - 0 ratings