Skip to content

Prerequisites

AWS Account Setup

Before starting the workshop, ensure you have the following:

  • AWS Account with administrative access
  • Default VPC in your account
  • AWS Region: You can use any of the following regions:
    • us-east-1
    • us-east-2
    • us-west-2
    • eu-central-1
    • eu-west-1
    • eu-west-2

Amazon Bedrock Setup

We will be using Amazon Bedrock to access foundation models in this workshop. Below, we configure model access in Amazon Bedrock for building and running generative AI applications. Bedrock provides models from multiple providers.

Amazon Bedrock Setup Instructions

  1. Search for Amazon Bedrock in the AWS console. Amazon Bedrock Search

  2. Expand the side menu and select Model access. Amazon Bedrock Model Access Link

  3. Click Enable specific models. Amazon Bedrock Model access vide

  4. Select the following models:

  5. Amazon (All Titan models)
  6. Click Next, review, and then submit. Amazon Bedrock Model Selection
  7. Monitor model access status and ensure Access granted. Amazon Bedrock Model Submit
✓ Congratulations!
you've successfully set up Amazon Bedrock!

Workspace Setup

You will need a workspace to run the workshop. You can use the Amazon SageMaker Studio CodeEditor for this workshop or you can use your local machine.

Configure Amazon SageMaker Studio CodeEditor

  1. Download the CloudFormation template to your local machine: cdk-cicd-workshop.yml

CloudFormation Stack Setup

Within your AWS account:

  1. Navigate to AWS CloudFormation (via AWS Console) to create a new stack. AWS CloudFormation
  2. On the "Create stack" screen, under the Specify a template section, select the Upload a template file option and navigate to select the cdk-cicd-workshop.yml file you downloaded earlier. Click Next. AWS CloudFormation Upload
  3. On the "Specify stack details" screen, under the Stack name section, provide a name for the CloudFormation stack (e.g., cdk-cicd-workshop).
  4. Leave the rest of the parameters unchanged, and click Next. AWS CloudFormation Upload
  5. On the "Configure stack options" screen, leave the default parameters unchanged, scroll to the bottom of the page, and click Next.
  6. On the "Review" screen, scroll to the bottom of the page and check the box:
    "I acknowledge that AWS CloudFormation might create IAM resources.". Click Create Stack. Acknowledge IAM resources

CloudFormation will take a few minutes to run and set up your environment. Please wait for this step to complete.

✓ Congratulations!
You have successfully deployed the AWS environment for this workshop. Next, we will verify the environment.

Open Amazon SageMaker Studio CodeEditor

  1. In the AWS console, type "SageMaker" in the search bar and navigate to the Amazon SageMaker service page.
  2. Click on the Studio link in the left navigation pane under the Control Panel. Sagemaker Studio
  3. You should see a pre-configured user. Click Open Studio. Sagemaker Studio This will open the SageMaker Studio UI in a new browser window.

  4. Click on the Code Editor icon under Applications and run the my-space application. Sagemaker Studio

  5. Click Open to launch the Code Editor in a new browser tab. Sagemaker Studio
  6. In the Project folder, open the cdk-cicd-example project, which is already initialized for you. Sagemaker Studio
✓ Congratulations!
You have a ready to go CodeEditor.

Click Next to continue to the next section.

Next

Configure Local Machine

Install the following tools on your local machine:

Configure the following environment variables:

export AWS_REGION=<region>
export AWS_ACCOUNT_ID=<account-id>
export AWS_PROFILE=<profile> # Optional in case you have multiple profiles
Congratulations!
You have a ready to go workspace.

Click Next to continue to the next section.

Next