feat: add IAM role support and remove django.contrib.sites dependency
- Add optional IAM role authentication for AWS SES backend - Remove AwsSesSettings model and sites framework dependency - Maintain backward compatibility with access key authentication - Update backend to conditionally use credentials when provided - Remove sites framework from installation requirements - Update documentation with IAM role configuration examples BREAKING CHANGE: Removes django.contrib.sites dependency and AwsSesSettings model
This commit is contained in:
14
README.md
14
README.md
@@ -70,14 +70,18 @@ SITE_ID = 1
|
||||
|
||||
Configure AWS SES credentials and the email backend:
|
||||
|
||||
### Option 1: IAM Role (Recommended for AWS environments)
|
||||
```python
|
||||
AWS_SES_ACCESS_KEY_ID = 'your-access-key-id' # Replace with your AWS IAM credentials
|
||||
AWS_SES_SECRET_ACCESS_KEY = 'your-secret-access-key'
|
||||
AWS_SES_REGION_NAME = 'us-east-1' # Adjust to your AWS SES region
|
||||
# No AWS credentials needed in settings
|
||||
AWS_SES_REGION_NAME = 'us-east-1'
|
||||
AWS_SES_REGION_ENDPOINT = 'https://email.us-east-1.amazonaws.com'
|
||||
|
||||
EMAIL_BACKEND = 'django_aws_ses.backends.SESBackend'
|
||||
DEFAULT_FROM_EMAIL = 'no-reply@yourdomain.com' # Verified in AWS SES
|
||||
DEFAULT_FROM_EMAIL = 'no-reply@yourdomain.com'
|
||||
```
|
||||
### Option 2: Access Keys
|
||||
```
|
||||
AWS_SES_ACCESS_KEY_ID = 'your-access-key-id'
|
||||
AWS_SES_SECRET_ACCESS_KEY = 'your-secret-access-key'
|
||||
```
|
||||
|
||||
Optional: Enable debugging logs for troubleshooting:
|
||||
|
||||
Reference in New Issue
Block a user