Skip to content

Commit 4ef886b

Browse files
edwardfoyleRachel Lee Nabors
authored andcommitted
Update user creation flow to IAM console v2 (#5078)
* update user creation flow with IAM console v2 flow * include previous flow at bottom * address PR comments and other minor formatting * adjust code block * update cli version range * update version numbers
1 parent e8e4a32 commit 4ef886b

File tree

8 files changed

+81
-8
lines changed

8 files changed

+81
-8
lines changed
68.2 KB
Loading
129 KB
Loading
159 KB
Loading
42.4 KB
Loading
60.1 KB
Loading
116 KB
Loading
76.6 KB
Loading

src/pages/cli/start/install.mdx

Lines changed: 81 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
export const meta = {
22
title: `Installation`,
3-
description: `How to install & configure Amplify CLI`,
3+
description: `How to install & configure Amplify CLI`
44
};
55

6-
7-
86
## Install the Amplify CLI
97

108
The Amplify Command Line Interface (CLI) is a unified toolchain to create AWS cloud services for your app. Let's go ahead and install the Amplify CLI.
119

12-
import all0 from "/src/fragments/cli-install-block.mdx";
10+
import all0 from '/src/fragments/cli-install-block.mdx';
1311

14-
<Fragments fragments={{all: all0}} />
12+
<Fragments fragments={{ all: all0 }} />
1513

1614
### Pre-requisites for installation
1715

@@ -23,11 +21,86 @@ import all0 from "/src/fragments/cli-install-block.mdx";
2321

2422
To set up the Amplify CLI on your local machine, you have to configure it to connect to your AWS account.
2523

24+
> If you already have an AWS profile with credentials on your machine, you can skip this step.
25+
26+
> If you are using CLI version < 10.8.0 go to [Configure CLI < 10.8.0](#configure-the-amplify-cli-version--1080)
27+
28+
Configure Amplify by running the following command:
29+
30+
```bash
31+
amplify configure
32+
```
33+
34+
`amplify configure` will ask you to sign into the AWS Console.
35+
36+
Once you're signed in, Amplify CLI will ask you to create an IAM user.
37+
38+
> Amazon IAM (Identity and Access Management) enables you to manage users and user permissions in AWS. You can learn more about Amazon IAM [here](https://aws.amazon.com/iam/).
39+
40+
```console
41+
Specify the AWS Region
42+
? region: # Your preferred region
43+
Follow the instructions at
44+
https://docs.amplify.aws/cli/start/install/#configure-the-amplify-cli
45+
46+
to complete the user creation in the AWS console
47+
https://console.aws.amazon.com/iamv2/home#/users/create
48+
```
49+
50+
Navigate to the [IAM User creation page](https://console.aws.amazon.com/iamv2/home#/users/create) if it's not already open.
51+
52+
Enter a User name and select **Next**. You can name the user anything but we'll call it "amplify-dev".
53+
54+
![image](/images/cli/user-creation/user-name.png)
55+
56+
Select **Attach policies directly** and select **AdministratorAccess-Amplify** as the Permissions policy. Select **Next**.
57+
58+
![image](/images/cli/user-creation/user-permissions.png)
59+
60+
On the Review page, check that everything looks good and select **Create user**.
61+
62+
![image](/images/cli/user-creation/user-review.png)
63+
64+
This will redirect to the users list page. Select the user you just created.
65+
66+
![image](/images/cli/user-creation/user-list.png)
67+
68+
On the user details page, navigate to the **Security credentials** tab, scroll down to **Access keys** and select **Create access keys**.
69+
70+
![image](/images/cli/user-creation/create-access-keys.png)
71+
72+
On the next page, select **Command Line Interface**, acknowledge the warning, and select **Next**.
73+
74+
![image](/images/cli/user-creation/ack-page.png)
75+
76+
On the next page select **Create access key**. You’ll then see a page with the access keys for the user. Use the copy icon to copy these values to your clipboard, then return to the Amplify CLI.
77+
78+
![image](/images/cli/user-creation/access-keys-done.png)
79+
80+
Enter the values you just copied into the corresponding CLI prompts.
81+
82+
```console
83+
Enter the access key of the newly created user:
84+
? accessKeyId: # YOUR_ACCESS_KEY_ID
85+
? secretAccessKey: # YOUR_SECRET_ACCESS_KEY
86+
This would update/create the AWS Profile in your local machine
87+
? Profile Name: # (default)
88+
89+
Successfully set up the new user.
90+
```
91+
92+
## Configure the Amplify CLI version < 10.8.0
93+
2694
### Option 1: Watch the video guide
2795

2896
Watch the video below to learn how to install and configure the Amplify CLI or skip to the next section to follow the step-by-step instructions.
2997

30-
<iframe src="https://www.youtube-nocookie.com/embed/fWbM5DLh25U" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
98+
<iframe
99+
src="https://www.youtube-nocookie.com/embed/fWbM5DLh25U"
100+
frameborder="0"
101+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
102+
allowfullscreen
103+
></iframe>
31104

32105
### Option 2: Follow the instructions
33106

@@ -40,6 +113,7 @@ amplify configure
40113
`amplify configure` will ask you to sign into the AWS Console.
41114

42115
Once you're signed in, Amplify CLI will ask you to create an IAM user.
116+
43117
> Amazon IAM (Identity and Access Management) enables you to manage users and user permissions in AWS. You can learn more about Amazon IAM [here](https://aws.amazon.com/iam/).
44118
45119
```console
@@ -65,7 +139,6 @@ This would update/create the AWS Profile in your local machine
65139

66140
Successfully set up the new user.
67141
```
68-
69142
<Callout>
70143

71144
It is recommended to create a new IAM user for every device that installs the Amplify CLI, rather than attempt to use an existing IAM user used on another device. Having a distinct user for each machine provides the best level of visibility and control without breaking the deployment of your app, allowing for the quick deactivation of an individual machine if needed.
@@ -74,4 +147,4 @@ It is recommended to create a new IAM user for every device that installs the Am
74147

75148
### Work within your frontend project
76149

77-
After you install the CLI, navigate to a JavaScript, iOS, or Android project root, initialize AWS Amplify in the new directory by running `amplify init`. After a few configuration questions, you can use amplify help at any time to see the overall command structure. When you’re ready to add a feature, run `amplify add <category>`.
150+
After you install the CLI, navigate to a JavaScript, iOS, or Android project root, initialize AWS Amplify in the new directory by running `amplify init`. After a few configuration questions, you can use amplify help at any time to see the overall command structure. When you’re ready to add a feature, run `amplify add <category>`.

0 commit comments

Comments
 (0)