Getting Started

Preparing your environment.

Prerequisites

To get started, make sure you have a valid AWS account, and you have installed AWS CLI on your machine.

NOTE: AWS Bedrock is not free. Make sure you check the pricing before going ahead.

Let's begin to set up the process step by step.

Login to AWS Management Console and search for IAM.

step1

Click Users

step2

Click Create user

step3

Provide a name. I am using "bedrock_user" you can choose any name that suits you and then move forward.

step4

Next, click Attach policies directly and check AmazonBedrockFullAccess and move forward.

Always use strict policies based on your organization rules. For this tutorial, it's fine to use full access, but we would normally prohibit it.

step5

Review everything is done correctly and then click Create user.

step6

Once the user is created successfully, you will be redirected to the "users" page. Click the newly created user.

step7

Next, click Security credentials.

step8

Click Create access key.

step9

Next, choose use-case as Other and move forward.

step10

Provide a tag if you wish to. But it's completely optional. Go ahead and click Create access key.

step11

You can see the below image, access key and secret access key have been generated for us.

step12

Now, we need to configure AWS CLI to use the access keys, which will be helpful when we are interacting our Go application with AWS SDK.

Open the Terminal and then type aws configure. After that, provide your access key id and secret access key.

step13

Avoid copying the AWS access keys you see on the screen, as they will become invalid after a few days. Instead, ensure you use your own access keys and secret key.

Our AWS CLI has been configured properly now. Let's move ahead and enable the model access.