You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To set up the Amplify CLI on your local machine, you have to configure it to connect to your AWS account.
123
123
124
-
> If you already have an AWS profile with credentials on your machine, you can skip this step.
124
+
<Calloutinfo>
125
+
126
+
**Note**: If you already have an AWS profile with credentials on your machine, you can skip this step.
127
+
128
+
</Callout>
125
129
126
130
Configure Amplify by running the following command:
127
131
128
132
```bash
129
133
amplify configure
130
134
```
131
135
132
-
`amplify configure` will ask you to sign into the AWS Console.
136
+
<Calloutinfo>
133
137
134
-
Once you're signed in, Amplify CLI will ask you to create an IAM user.
138
+
The `configure` command only supports creating AWS profiles that use permanent credentials. If you are using an IAM role or IAM Identity Center (previously AWS SSO), [learn how to configure Amplify CLI manually](#manually-configure-the-amplify-cli)
135
139
136
-
> 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/).
140
+
</Callout>
141
+
142
+
`amplify configure` will ask you to sign into the AWS Console.
143
+
144
+
Once you're signed in, Amplify CLI will ask you to use the [AWS Identity and Access Management (IAM)](https://aws.amazon.com/iam/) to create an IAM user.
137
145
138
146
```console
139
147
Specify the AWS Region
@@ -171,7 +179,7 @@ On the next page, select **Command Line Interface**, acknowledge the warning, an
171
179
172
180

173
181
174
-
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.
182
+
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.
175
183
176
184

177
185
@@ -187,4 +195,62 @@ This would update/create the AWS Profile in your local machine
187
195
Successfully set up the new user.
188
196
```
189
197
190
-
In the next section, you'll set up the app and initialize Amplify.
198
+
On the next page, you'll set up the app and initialize Amplify.
199
+
200
+
## Manually configure the Amplify CLI
201
+
202
+
If you are using an IAM role or IAM Identity Center (previously AWS SSO), you can configure your local machine for use with Amplify CLI by creating [AWS profile entries](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-format-profile) manually rather than the `amplify configure` wizard.
203
+
204
+
To create an AWS profile locally using IAM Identity Center, you can use the AWS CLI wizard, [`aws configure sso`](https://docs.aws.amazon.com/cli/latest/userguide/sso-configure-profile-token.html#sso-configure-profile-token-auto-sso), or write to `~/.aws/config` directly:
205
+
206
+
<Calloutinfo>
207
+
208
+
[Learn how to install the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
Currently, the Amplify CLI requires a workaround for use with IAM Identity Center due to [an issue in how it resolves credentials](https://github.com/aws-amplify/amplify-cli/issues/4488).
Using the example above, when creating a new app or pulling an existing app, specify `my-sso-profile` as the AWS profile you'd like to use with the Amplify app.
244
+
245
+
To create [an AWS profile locally using an IAM role](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html), assign the `AdministratorAccess-Amplify` permissions set to the role and set the role in your `~/.aws/config` file:
Using the example above, when creating a new app or pulling an existing app, specify `amplify-admin` as the AWS profile you'd like to use with the Amplify app
0 commit comments