Create IAM Role
Create IAM Role
In this step, we will proceed to create IAM Role. In this IAM Role, the policy AmazonDynamoDBFullAccess and CloudWatchFullAccess will be assigned, this is the policy that allows the Lambda function to interact with DynamoDB databases.
- Go to IAM service administration interface
- In the left navigation bar, click Roles.

- Click Create role.

- on Select trusted entity
- Click AWS service.
- Click Lambda
- Click Next

- In the Search box, enter AmazonDynamoDBFullAccess and press Enter to search for this policy.
- Click the policy AmazonDynamoDBFullAccess.

- In the Search box, enter CloudWatchFullAccess and press Enter to search for this policy.
- Click the policy CloudWatchFullAccess
- then click Next

- Click Next: Review.
- Name the Role BotRoles in Role Name

- check again if the roles are correct
- Click Create Role

Next, we will configure the role to Lambda so it can be able to call the databases.