Skip to main content

Code

cookbook/tools/aws_ses_tools.py

Usage

1

Create a virtual environment

Open the Terminal and create a python virtual environment.
2

Set up AWS SES

Verify your email/domain: For testing: 1. Go to [AWS SES

Console](https://console.aws.amazon.com/ses/home) > Verified Identities > Create Identity 2. Choose “Email Address” verification 3. Click verification link sent to your email For production: 1. Choose “Domain” and follow DNS verification steps 2. Add DKIM and SPF records to your domain’s DNS Note: In sandbox mode, both sender and recipient emails must be verified.
3

Configure AWS credentials

Create IAM user: 1. Go to IAM Console > Users > Add User 2. Enable

“Programmatic access” 3. Attach ‘AmazonSESFullAccess’ policy ### Set credentials (choose one method): Method 1 - Using AWS CLI: bash aws configure Method 2 - Environment variables: bash export AWS_ACCESS_KEY_ID=xxx export AWS_SECRET_ACCESS_KEY=xxx export AWS_DEFAULT_REGION=us-east-1 export OPENAI_API_KEY=xxx
4

Install libraries

bash pip install -U boto3 openai duckduckgo-search agno
5

Run Agent

bash python cookbook/tools/aws_ses_tools.py
6

Troubleshooting

If emails aren’t sending, check:
  • Both sender and recipient are verified (in sandbox mode)
  • AWS credentials are correctly configured
  • You’re within sending limits
  • Your IAM user has correct SES permissions
  • Use SES Console’s ‘Send Test Email’ feature to verify setup