Task 2: Manage Users
In this task, you will configure Amplify Auth and you will enable Amazon Bedrock foundation model access
Introduction
Implementation
Set up Amplify Auth
The app uses email as the default login mechanism. When the users sign up, they receive a verification email. In this step, you will customize the verification email that is sent to users.
1. Modify the resource file
On your local machine, navigate to the ai-generated-recipes/amplify/auth/resource.ts file and update it with the following code. Then, save the file.

Resource.ts code
Update your resource.ts file with this code
import { defineAuth } from "@aws-amplify/backend";
export const auth = defineAuth({
loginWith: {
email: {
verificationEmailStyle: "CODE",
verificationEmailSubject: "Welcome to the AI-Powered Recipe Generator!",
verificationEmailBody: (createCode) =>
`Use this code to confirm your account: ${createCode()}`,
},
},
});
2. View the customized email
The image on the right is an example of the customized verification email:

Set up Amazon Bedrock Model Access
Amazon Bedrock enables users to request access to a variety of Generative AI models. In this tutorial, you will need access to Claude 3 Sonnet from Anthropic.
1. Open the Bedrock console
Sign in to the AWS Management console in a new browser window, and open the AWS Amazon Bedrock console at https://console.aws.amazon.com/bedrock/.
Verify that you are in the N. Virginia us-east-1 region, and choose Get started.

2. Select the Claude model
In the Foundation models section, choose the Claude model.

3. Request access to Claude 3 Sonnet
Scroll down to the Claude models section, and choose the Claude 3 Sonnet tab, and select Request model access.
Note: If you already have access to some models, then the button will display Manage model access.

4. Request model access
In the Base models section, for Claude 3 Sonnet, choose Available to request, and select Request model access.

5. Choose Next
On the Edit model access page, choose Next.

6. Submit request
On the Review and Submit page, choose Submit.

Conclusion
Build a Serverless Backend
Did you find what you were looking for today?
Let us know so we can improve the quality of the content on our pages