Setup API Gateway

1. Go to API Gateway

  • Click “Create an API” alt text
  • Select “Build” under REST API alt text
  • Enter a name alt text
  • Choose a security policy alt text
  • Click “Create API”

2. Create Resource

  • Click “Create Resource” alt text
  • Name the resource and enable CORS alt text
  • Click the “Create Resource” button

3. Create Method

  • Click “Create Method” alt text
  • Select POST and enable Lambda Proxy Integration alt text
  • Add the Lambda function ARN alt text
  • Click “Create Method”

4. Deploy API

  • Click “Deploy API” alt text
  • Choose “New Stage” and name the stage alt text
  • Click the “Deploy” button

5. Test

  • After creating the stage, you will get the Invoke URL alt text

  • Use the Invoke URL to test in Postman with the format InvokeURL/, using the POST method alt text

  • Use the following JSON body:

    { “message”: “What is Amazon Bedrock? Please answer briefly, no more than 3 lines.” }

  • Click “Send” alt text

  • You should receive a successful response