Getting started with Amazon Bedrock - Amazon Bedrock

Getting started with Amazon Bedrock

Before you can use Amazon Bedrock, you must carry out the following steps:

  • Sign up for an AWS account (if you don't already have one).

  • Create an AWS Identity and Access Management role with the necessary permissions for Amazon Bedrock.

  • Request access to the foundation models (FM) that you want to use.

If you're new to AWS and need to sign up for an AWS account, expand I'm new to AWS. Otherwise, skip that step and instead expand I already have an AWS account.

If you do not have an AWS account, complete the following steps to create one.

To sign up for an AWS account
  1. Open https://portal.aws.amazon.com/billing/signup.

  2. Follow the online instructions.

    Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad.

    When you sign up for an AWS account, an AWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform tasks that require root user access.

AWS sends you a confirmation email after the sign-up process isn complete. At any time, you can view your current account activity and manage your account by going to https://aws.amazon.com/ and choosing My Account.

Secure your AWS account root user
  1. Sign in to the AWS Management Console as the account owner by choosing Root user and entering your AWS account email address. On the next page, enter your password.

    For help signing in by using root user, see Signing in as the root user in the AWS Sign-In User Guide.

  2. Turn on multi-factor authentication (MFA) for your root user.

    For instructions, see Enable a virtual MFA device for your AWS account root user (console) in the IAM User Guide.

Create a user with administrative access
  1. Enable IAM Identity Center.

    For instructions, see Enabling AWS IAM Identity Center in the AWS IAM Identity Center User Guide.

  2. In IAM Identity Center, grant administrative access to a user.

    For a tutorial about using the IAM Identity Center directory as your identity source, see Configure user access with the default IAM Identity Center directory in the AWS IAM Identity Center User Guide.

Sign in as the user with administrative access
  • To sign in with your IAM Identity Center user, use the sign-in URL that was sent to your email address when you created the IAM Identity Center user.

    For help signing in using an IAM Identity Center user, see Signing in to the AWS access portal in the AWS Sign-In User Guide.

To learn more about IAM, see Identity and access management for Amazon Bedrock and the IAM User Guide.

After you have created an administrative user, proceed to I already have an AWS account to set up permissions for Amazon Bedrock.

Use IAM to create a role for with the necessary permissions to use Amazon Bedrock. You can then add users to this role to grant the permissions.

To create an Amazon Bedrock role
  1. Create a role with a name of your choice by following the steps at Creating a role to delegate permissions to an IAM user in the IAM User Guide. When you reach the step to attach a policy to the role, attach the AmazonBedrockFullAccess AWS managed policy.

  2. Create a new policy to allow your role to manage access to Amazon Bedrock models. From the following list, select the link that corresponds to your method of choice and follow the steps. Use the following JSON object as the policy.

    { "Version": "2012-10-17", "Statement": [ { "Sid": "MarketplaceBedrock", "Effect": "Allow", "Action": [ "aws-marketplace:ViewSubscriptions", "aws-marketplace:Unsubscribe", "aws-marketplace:Subscribe" ], "Resource": "*" } ] }
  3. Attach the policy that you created in the last step to your Amazon Bedrock role by following the steps at Adding and removing IAM identity permissions.

To add users to the Amazon Bedrock role
  1. For users to access an IAM role, you must add them to the role. You can add both users in your account or from other accounts. To grant users permissions to switch to the Amazon Bedrock role that you created, follow the steps at Granting a user permissions to switch roles and specify the Amazon Bedrock role as the Resource.

    Note

    If you need to create more users in your account so that you can give them access to the Amazon Bedrock role, follow the steps in Creating an IAM user in your AWS account.

  2. After you've granted a user permissions to use the Amazon Bedrock role, provide the user with role name and ID or alias of the account to which the role belongs. Then, guide the user through how to switch to the role by following the instructions at Providing information to the user.

Request access to a Amazon Bedrock foundation model

After setting up your Amazon Bedrock IAM role, you can sign into the Amazon Bedrock console and request access to foundation models.

To request access to an Amazon Bedrock FM
  1. Sign into the AWS Management Console and switch to the Amazon Bedrock role that you set up (or that was set up for you) by following the steps under To switch to a role (console) in Switching to a role (console).

  2. Open the Amazon Bedrock console at https://console.aws.amazon.com/bedrock/.

  3. For the purposes of this tutorial, you should be in the US East (N. Virginia) (us-east-1) Region. To change regions, choose the Region name at the top right of the console, next to your IAM role. Then select US East (N. Virginia) (us-east-1).

  4. Select Model access at the bottom of the left navigation pane.

  5. On the Model access page, you can review the End User License Agreement (EULA) for models in the EULA column in the Base models table.

  6. Choose Modify model access.

  7. Do one of the following:

    • To request access to all models, choose Enable all models. On the page you're taken to, the checkboxes next to all the models will be filled.

    • To request access to specific models, choose Enable specific models. On the page you're taken to, you have the following options:

      • To request access to all models by a provider, select the checkbox next to the provider name.

      • To request access to one model, select the checkbox next to the model name.

  8. For the purposes of the following tutorials, you should minimally request access to the Amazon Titan Text G1 - Express and Amazon Titan Image Generator G1 models. Then choose Next.

  9. Review the models that you're requesting access to and the Terms. When you're ready, choose Submit to request access.

  10. Access may take several minutes to complete. When access is granted to a model, the Access status for that model willbecome Access granted.

(Optional tutorials) Explore Amazon Bedrock features through the console or API

After requesting access to the foundation models that you want to use, you'll be ready to explore the different capabilities offered by Amazon Bedrock.

If you want to familiarize yourself more with Amazon Bedrock first, you can continue to the following pages: