Skip to content

Commit 052808c

Browse files
committed
Update qbusiness tutorial
1 parent b3a811c commit 052808c

1 file changed

Lines changed: 30 additions & 29 deletions

File tree

tuts/040-qbusiness-ica/qbusiness-ica.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ The total cost for running the resources in this tutorial for one hour is approx
2626

2727
Amazon Q Business uses IAM Identity Center for user management. In this step, you'll check if you have an IAM Identity Center instance and create one if needed.
2828

29-
First, check if you already have an IAM Identity Center instance:
29+
First, check if you already have an IAM Identity Center instance. Replace "us-east-1" with the AWS Region where your IAM Identity Center instance is located.
3030

3131
```bash
3232
aws sso-admin list-instances --region us-east-1 --query 'Instances[0].InstanceArn' --output text
3333
```
3434

35-
If the command returns "None" or an empty result, you need to create an IAM Identity Center instance:
35+
If the command returns "None" or an empty result, you need to create an IAM Identity Center instance. Replace "us-east-1" with the AWS Region where you want to create your IAM Identity Center instance.
3636

3737
```bash
3838
aws sso-admin create-instance --region us-east-1 --name "QBusinessIdentityCenter-abcd1234" --query 'InstanceArn' --output text
@@ -48,7 +48,7 @@ Amazon Q Business requires IAM roles and policies to function properly. In this
4848

4949
First, create a trust policy file that allows Amazon Q Business to assume the role:
5050

51-
Note: For this tutorial, replace "123456789012" with your AWS account ID. Replace "us-east-1" with the AWS Region name of your Identity Center instance.
51+
Note: For this tutorial, replace "123456789012" with your AWS account ID. Replace "us-east-1" with the AWS Region name that you plan to use.
5252

5353
```bash
5454
cat > qbusiness-trust-policy.json << EOF
@@ -78,7 +78,7 @@ EOF
7878

7979
Next, create a permissions policy file that defines what actions the role can perform.
8080

81-
Note: For this tutorial, replace "123456789012" with your AWS account number.
81+
Note: For this tutorial, replace "123456789012" with your AWS account number. Replace "us-east-1" with the AWS Region name that you plan to use.
8282

8383
```bash
8484
cat > qbusiness-permissions-policy.json << EOF
@@ -133,7 +133,7 @@ cat > qbusiness-permissions-policy.json << EOF
133133
EOF
134134
```
135135

136-
Now, create the IAM role using the trust policy:
136+
Now, create the IAM role using the trust policy. Replace "us-east-1" with the AWS Region name that you plan to use.
137137

138138
```bash
139139
aws iam create-role \
@@ -144,7 +144,7 @@ aws iam create-role \
144144
--output text
145145
```
146146

147-
Create an IAM policy using the permissions policy file:
147+
Create an IAM policy using the permissions policy file. Replace "us-east-1" with the AWS Region name that you plan to use.
148148

149149
```bash
150150
aws iam create-policy \
@@ -155,7 +155,7 @@ aws iam create-policy \
155155
--output text
156156
```
157157

158-
Attach the policy to the role. Replace "123456789012" with your AWS account number.
158+
Attach the policy to the role. Replace "123456789012" with your AWS account number. Replace "us-east-1" with the AWS Region name that you plan to use.
159159

160160
```bash
161161
aws iam attach-role-policy \
@@ -172,7 +172,7 @@ Before creating the Amazon Q Business application, you need to set up a user in
172172

173173
First, get the Identity Store ID associated with your IAM Identity Center instance.
174174

175-
Replace "arn:aws:sso:::instance/ssoins-abcd1234xmpl" with the ARN of your IAM Identity Center instance.
175+
Replace "arn:aws:sso:::instance/ssoins-abcd1234xmpl" with the ARN of your IAM Identity Center instance. Replace "us-east-1" with the AWS Region where your IAM Identity Center instance is located.
176176

177177
```bash
178178
aws sso-admin describe-instance \
@@ -184,7 +184,7 @@ aws sso-admin describe-instance \
184184

185185
Make a note of the Identity Store ID in the response. You'll use it in the following command.
186186

187-
Now, create a user in the Identity Store. Replace "d-abcd1234xmpl" with your actual Identity Store ID.
187+
Now, create a user in the Identity Store. Replace "d-abcd1234xmpl" with your actual Identity Store ID. Replace "us-east-1" with the AWS Region where your IAM Identity Center instance is located.
188188
Note: In a production environment, use valid email addresses from your organization's domain instead of example.com.
189189

190190
```bash
@@ -207,7 +207,7 @@ This command creates a user in IAM Identity Center and returns the user ID. Save
207207

208208
Now you're ready to create the Amazon Q Business application.
209209

210-
Create the application using the following command. Replace "arn:aws:sso:::instance/ssoins-abcd1234xmpl" with your actual IAM Identity Center instance ARN. Replace "123456789012" with your AWS account number.
210+
Create the application using the following command. Replace "arn:aws:sso:::instance/ssoins-abcd1234xmpl" with your actual IAM Identity Center instance ARN. Replace "123456789012" with your AWS account number. Replace "us-east-1" with the AWS Region where your IAM Identity Center instance is located.
211211

212212
```bash
213213
aws qbusiness create-application \
@@ -225,7 +225,7 @@ This command creates an Amazon Q Business application and returns the applicatio
225225

226226
After creating the application, wait for it to be fully provisioned (approximately 30 seconds).
227227

228-
Next, get the application ARN from IAM Identity Center:
228+
Next, get the application ARN from IAM Identity Center. Replace "us-east-1" with the AWS Region where your IAM Identity Center instance is located.
229229

230230
```bash
231231
aws sso-admin list-applications \
@@ -239,7 +239,7 @@ If the command doesn't return an ARN immediately, wait a few seconds and try aga
239239

240240
## Step 5: Enable creator mode (LLM direct chat)
241241

242-
To allow users to chat directly with the LLM without creating an index, you need to enable creator mode. Replace "app-abcd1234xmpl" with your actual application ID from Step 4.
242+
To allow users to chat directly with the LLM without creating an index, you need to enable creator mode. Replace "app-abcd1234xmpl" with your actual application ID from Step 4. Replace "us-east-1" with the AWS Region where your Amazon Q Business application is located.
243243

244244
```bash
245245
aws qbusiness update-chat-controls-configuration \
@@ -252,7 +252,7 @@ aws qbusiness update-chat-controls-configuration \
252252

253253
## Step 6: Assign the user to the application
254254

255-
Now that you have both the user and the application created, you need to assign the user to the application. Replace "arn:aws:sso::123456789012:application/ssoins-abcd1234xmpl/apl-abcd1234xmpl" with your application ARN. Replace "1234abcd-xmpl-5678-efgh-90ijklmnopqr" with the user ID that's returned in Step 3.
255+
Now that you have both the user and the application created, you need to assign the user to the application. Replace "arn:aws:sso::123456789012:application/ssoins-abcd1234xmpl/apl-abcd1234xmpl" with your application ARN. Replace "1234abcd-xmpl-5678-efgh-90ijklmnopqr" with the user ID that's returned in Step 3. Replace "us-east-1" with the AWS Region where your IAM Identity Center instance is located.
256256

257257
```bash
258258
aws sso-admin create-application-assignment \
@@ -266,7 +266,7 @@ This command assigns the user to the Amazon Q Business application, allowing the
266266

267267
## Step 7: Create a user subscription
268268

269-
After assigning the user to the application, you need to create a subscription that determines their access level. Replace "app-abcd1234xmpl" with the application ID that's returned in Step 4. Replace "1234abcd-xmpl-5678-efgh-90ijklmnopqr" with the user ID that's returned in Step 3.
269+
After assigning the user to the application, you need to create a subscription that determines their access level. Replace "app-abcd1234xmpl" with the application ID that's returned in Step 4. Replace "1234abcd-xmpl-5678-efgh-90ijklmnopqr" with the user ID that's returned in Step 3. Replace "us-east-1" with the AWS Region where your Amazon Q Business application is located.
270270

271271
```bash
272272
aws qbusiness create-subscription \
@@ -284,7 +284,7 @@ This command creates a full Q Business subscription for the user, giving them fu
284284

285285
To provide a web interface for your Amazon Q Business application, you can create a web experience.
286286

287-
First, create a trust policy file for the web experience role. Replace "123456789012" with your AWS account number. Replace "app-abcd1234xmpl" with the Q Business application ID that's returned from Step 4.
287+
First, create a trust policy file for the web experience role. Replace "123456789012" with your AWS account number. Replace "app-abcd1234xmpl" with the Q Business application ID that's returned from Step 4. Replace "us-east-1" with the AWS Region of your Q Business application.
288288

289289
```bash
290290
cat > qbusiness-web-trust-policy.json << EOF
@@ -315,7 +315,7 @@ cat > qbusiness-web-trust-policy.json << EOF
315315
EOF
316316
```
317317

318-
Next, create a permissions policy file for the web experience. Replace "app-abcd1234xmpl" with your actual application ID that's returned in Step 4 and replace "123456789012" with your AWS account ID.
318+
Next, create a permissions policy file for the web experience. Replace "app-abcd1234xmpl" with your actual application ID that's returned in Step 4 and replace "123456789012" with your AWS account ID. Replace "us-east-1" with the AWS Region of your Q Business Application.
319319

320320
```bash
321321
cat > qbusiness-web-permissions-policy.json << EOF
@@ -486,7 +486,7 @@ cat > qbusiness-web-permissions-policy.json << EOF
486486
EOF
487487
```
488488

489-
Create the IAM role for the web experience:
489+
Create the IAM role for the web experience. Replace "us-east-1" with the AWS Region name that you plan to use.
490490

491491
```bash
492492
aws iam create-role \
@@ -497,7 +497,7 @@ aws iam create-role \
497497
--output text
498498
```
499499

500-
Create an IAM policy for the web experience:
500+
Create an IAM policy for the web experience. Replace "us-east-1" with the AWS Region name that you plan to use.
501501

502502
```bash
503503
aws iam create-policy \
@@ -508,7 +508,7 @@ aws iam create-policy \
508508
--output text
509509
```
510510

511-
Attach the policy to the role. Replace "123456789012" with the AWS account number.
511+
Attach the policy to the role. Replace "123456789012" with the AWS account number. Replace "us-east-1" with the AWS Region name that you plan to use.
512512

513513
```bash
514514
aws iam attach-role-policy \
@@ -519,7 +519,7 @@ aws iam attach-role-policy \
519519

520520
After creating the role and policy, wait for them to propagate (approximately 15 seconds).
521521

522-
Now, create the web experience. Replace "123456789012" with the AWS account number. Replace "app-abcd1234xmpl" with the name of your application ID that's returned from Step 4.
522+
Now, create the web experience. Replace "123456789012" with the AWS account number. Replace "app-abcd1234xmpl" with the name of your application ID that's returned from Step 4. Replace "us-east-1" with the AWS Region where your Amazon Q Business application is located.
523523

524524
```bash
525525
aws qbusiness create-web-experience \
@@ -532,7 +532,7 @@ aws qbusiness create-web-experience \
532532

533533
This command creates a web experience for your Amazon Q Business application and returns the web experience ID. Save the web experience id for the following command to use.
534534

535-
To get the URL for the web experience. Replace "app-abcd1234xmpl" with the name of your application ID that's returned from Step 4. Replace "wex-abcd1234xmpl" with your actual web experience id.
535+
To get the URL for the web experience. Replace "app-abcd1234xmpl" with the name of your application ID that's returned from Step 4. Replace "wex-abcd1234xmpl" with your actual web experience id. Replace "us-east-1" with the AWS Region where your Amazon Q Business application is located.
536536

537537
```bash
538538
aws qbusiness get-web-experience \
@@ -551,19 +551,19 @@ To sign in and access the URL through a web browser, for username, use the user-
551551

552552
To verify that your Amazon Q Business application has been created successfully, you can use the following commands. Replace "app-abcd1234xmpl" with your actual application ID that's returned in Step 4.
553553

554-
Check the application details:
554+
Check the application details. Replace "us-east-1" with the AWS Region where your Amazon Q Business application is located.
555555

556556
```bash
557557
aws qbusiness get-application --region us-east-1 --application-id "app-abcd1234xmpl"
558558
```
559559

560-
List the user subscriptions:
560+
List the user subscriptions. Replace "us-east-1" with the AWS Region where your Amazon Q Business application is located.
561561

562562
```bash
563563
aws qbusiness list-subscriptions --region us-east-1 --application-id "app-abcd1234xmpl"
564564
```
565565

566-
If you created a web experience, list the web experiences:
566+
If you created a web experience, list the web experiences. Replace "us-east-1" with the AWS Region where your Amazon Q Business application is located.
567567

568568
```bash
569569
aws qbusiness list-web-experiences --region us-east-1 --application-id "app-abcd1234xmpl"
@@ -573,7 +573,7 @@ aws qbusiness list-web-experiences --region us-east-1 --application-id "app-abcd
573573

574574
To avoid ongoing charges for the resources created in this tutorial, you should delete them when you're done.
575575

576-
If you created a web experience, delete it first. Replace "app-abcd1234xmpl" with your actual application ID that's returned in Step 4 and replace "wex-abcd1234xmpl" with your actual web experience ID that's returned in Step 8.
576+
If you created a web experience, delete it first. Replace "app-abcd1234xmpl" with your actual application ID that's returned in Step 4 and replace "wex-abcd1234xmpl" with your actual web experience ID that's returned in Step 8. Replace "us-east-1" with the AWS Region where your Amazon Q Business application is located.
577577

578578
```bash
579579
aws qbusiness delete-web-experience \
@@ -582,7 +582,7 @@ aws qbusiness delete-web-experience \
582582
--web-experience-id "wex-abcd1234xmpl"
583583
```
584584

585-
Delete the user assignment. Replace "arn:aws:sso::123456789012:application/ssoins-abcd1234xmpl/apl-abcd1234xmpl" with your application ARN that's returned from Step 4. Replace "1234abcd-xmpl-5678-efgh-90ijklmnopqr" with the user ID that's returned in Step 3.
585+
Delete the user assignment. Replace "arn:aws:sso::123456789012:application/ssoins-abcd1234xmpl/apl-abcd1234xmpl" with your application ARN that's returned from Step 4. Replace "1234abcd-xmpl-5678-efgh-90ijklmnopqr" with the user ID that's returned in Step 3. Replace "us-east-1" with the AWS Region where your IAM Identity Center instance is located.
586586

587587
```bash
588588
aws sso-admin delete-application-assignment \
@@ -592,13 +592,13 @@ aws sso-admin delete-application-assignment \
592592
--principal-type USER
593593
```
594594

595-
Delete the Amazon Q Business application. Replace "app-abcd1234xmpl" with your actual application ID that's returned in Step 4.
595+
Delete the Amazon Q Business application. Replace "app-abcd1234xmpl" with your actual application ID that's returned in Step 4. Replace "us-east-1" with the AWS Region where your Amazon Q Business application is located.
596596

597597
```bash
598598
aws qbusiness delete-application --region us-east-1 --application-id "app-abcd1234xmpl"
599599
```
600600

601-
If you created a web experience role and policy, clean them up. Replace "123456789012" with your AWS account number.
601+
If you created a web experience role and policy, clean them up. Replace "123456789012" with your AWS account number. Replace "us-east-1" with the AWS Region name of your web experience role and policy.
602602

603603
```bash
604604
aws iam detach-role-policy \
@@ -611,7 +611,8 @@ aws iam delete-role --region us-east-1 --role-name "QBusinessWebRole-abcd1234"
611611
aws iam delete-policy --region us-east-1 --policy-arn "arn:aws:iam::123456789012:policy/QBusinessWebPolicy-abcd1234"
612612
```
613613

614-
Finally, clean up the service role and policy. Replace "123456789012" with your AWS account number.
614+
Finally, clean up the main application role and policy that are created in Step 2. Replace "123456789012" with your AWS account number. Replace "us-east-1" with the AWS Region name of your web experience role and policy.
615+
615616

616617
```bash
617618
aws iam detach-role-policy \

0 commit comments

Comments
 (0)