Getting a Token from Cloudflare
This section covers obtaining a Cloudflare API token that will be used by the ElephantDNSWatchdog Lambda to manage DNS records programmatically.
Part 1: Get the Token from Cloudflare
- Log in to the Cloudflare Dashboard.
- Click the User Icon (top right) > My Profile.
- Go to API Tokens (left sidebar) > Create Token.
- Use the Edit Zone DNS template.
- Under Zone Resources, select:
Include>Specific zone>your-domain.com(e.g., christardy.com)
- Click Continue to summary > Create Token.
- Copy the token immediately. (You won't be able to see it again).

Part 2: Store it in AWS Secrets Manager
- Log in to the AWS Console and search for Secrets Manager.
- Click Store a new secret.
- Select "Other type of secret".
- In the Key/value pairs section:
- Key:
CLOUDFLARE_API_TOKEN - Value: (Paste your Cloudflare token here)
- Key:
- Click Next.
- Secret name:
ElephantCloudflareToken(or a name your Lambda expects). - Click Next, keep defaults, and click Store.

Note - Token Security
Your ElephantDNSWatchdog Lambda can now securely retrieve this token to update DNS records.
Warning - Token Storage
Make sure to store the token securely. You won't be able to retrieve it again from Cloudflare if you lose it.
This token will be used in the ElephantDNSWatchdog → section.