Skip to content

CDK app to create IAM User/Role for Amazon Braket Hands-on Workshop

License

Notifications You must be signed in to change notification settings

hariby/amazon-braket-workshop-cdk

Repository files navigation

Welcome to Braket Workshop CDK!

This is a CDK app which creates IAM User and IAM Role for Amazon Braket Hands-on Workshop.

Usage

How to deploy (for Admin)

From you favorite environment (e.g., AWS CloudShell or AWS Cloud9), run commands below.

1. Setting up the CDK environment

sudo npm install -g aws-cdk

git clone https://github.com/hariby/amazon-braket-workshop-cdk.git
cd amazon-braket-workshop-cdk/
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

2. (Optional) Synthesize into CloudFormation templates

You can specify the number of attendees (the number of IAM Users or Braket Notebooks).

cdk synth --context num_users=30

3. Deploy stack(s)

As the same as cdk synth above, you can specify the number of attendees (the number of IAM Users or Braket Notebooks). You have to specify the initial password for IAM Users (this would be updated on the initial login).

cdk deploy braket-workshop-iam \
    --context num_users=30 \
    --parameters DefaultUserPassword="Braket@2020"

Wait until the CloudFormation stack became CREATE_COMPLETE. The deployment of the IAM stack takes roughly 3 minuites.

Check your AWS Account ID (12-digit numbers) or Alias to create a sign-in URL for participants: https://account-ID-or-alias.signin.aws.amazon.com/console

Deployment options
Enable QPU

By default, QPUs are disabled to avoid unexpected billing in the hands-on workshop. To try QPU, you can allow access by adding a disable_qpu=false context:

cdk deploy braket-workshop-iam \
    --context num_users=30 \
    --context disable_qpu=false \
    --parameters DefaultUserPassword="Braket@2020"
Deploying all the stacks including Braket Notebooks in 3 AWS Regions

Before deploying the Notebook Stack, please make sure you have enough limit for Amazon SageMaker Notebook Instances of ml.t3.medium. You can submit a service limit increase to AWS Support from here.

cdk deploy --all \
    --context num_users=30 \
    --parameters braket-workshop-iam:DefaultUserPassword="Braket@2020"
4. Clean up
cdk destroy --all

How to login (for Participants)

Workshop admin will provide 3 informations:

  • Login URL, which contains Account ID (12 digits) or account alias,
  • IAM user name: WorkshopUser-n (n = 0, ..., N), and
  • Password.

The users will be asked to update password when the initial login.

About

CDK app to create IAM User/Role for Amazon Braket Hands-on Workshop

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published