When attempting to set up email authentication for Google Workspace (formerly G Suite) in AWS Route 53, many administrators encounter the following error:
The record set could not be saved because:
- The Value field contains invalid characters or is in an invalid format.
Route 53's modern console enforces stricter validation rules for DNS records than traditional DNS providers. While Google's recommended SPF record v=spf1 include:_spf.google.com ~all
is technically valid, AWS's parser sometimes rejects the syntax.
Here are three validated approaches to implement SPF for Google Workspace in Route 53:
Method 1: TXT Record Format
Name: @ (or your domain name)
Type: TXT
Value: "v=spf1 include:_spf.google.com ~all"
TTL: 3600 (or your preferred value)
Method 2: SPF Record Format (Legacy)
Name: @
Type: SPF
Value: "v=spf1 include:_spf.google.com ~all"
TTL: 3600
Method 3: AWS CLI Alternative
If the GUI fails, use AWS CLI:
aws route53 change-resource-record-sets \
--hosted-zone-id YOUR_ZONE_ID \
--change-batch '{
"Changes": [{
"Action": "CREATE",
"ResourceRecordSet": {
"Name": "example.com",
"Type": "TXT",
"TTL": 300,
"ResourceRecords": [{
"Value": "\"v=spf1 include:_spf.google.com ~all\""
}]
}
}]
}'
After implementation, verify with these tools:
nslookup -type=txt yourdomain.com
- Google Admin Toolbox MX Check
- SPF validator tools like MXToolbox or Kitterman
Case 1: Multiple SPF records
AWS may reject if you have existing SPF records. Consolidate into a single record:
"v=spf1 include:_spf.google.com include:amazonses.com ~all"
Case 2: Complex configurations
For hybrid email systems, use this format:
"v=spf1 include:_spf.google.com ip4:192.0.2.0/24 include:spf.protection.outlook.com ~all"
- Always use quotation marks around TXT values in Route 53
- SPF records have a 255-character string limit per segment
- Consider DNS TTL values when making changes (lower during testing)
- Use AWS CloudFormation for infrastructure-as-code deployments
Many developers encounter this specific error when trying to configure Google Workspace email authentication in Route 53:
The record set could not be saved because:
- The Value field contains invalid characters or is in an invalid format.
AWS Route 53's current TXT record implementation has specific formatting requirements. While v=spf1 include:_spf.google.com ~all
is technically valid SPF syntax, AWS enforces additional constraints:
- Quotation marks requirement for TXT records containing spaces
- Strict character set validation
- Specific handling of the ~all mechanism
Here are two proven methods to implement Google's SPF record successfully:
Method 1: Using Proper TXT Record Formatting
Name: @ (or your domain name)
Type: TXT
Value: "v=spf1 include:_spf.google.com ~all"
TTL: 3600 (or your preferred value)
Method 2: Alternative SPF Record Format
Name: @ (or your domain name)
Type: TXT
Value: "v=spf1 include:_spf.google.com -all"
TTL: 3600
- Always wrap the SPF value in double quotes when using Route 53's interface
- The space after
v=spf1
is crucial - Consider using
-all
(hard fail) instead of~all
(soft fail) for stricter validation - DNS propagation may take up to 48 hours
After implementation, verify using these commands:
# Linux/macOS
dig +short TXT yourdomain.com
# Windows
nslookup -type=TXT yourdomain.com
For more comprehensive testing, use online SPF validators like MXToolbox or Google's own Admin Toolbox.
If problems persist:
- Check for multiple SPF records (only one is allowed per domain)
- Ensure no syntax errors in the record
- Verify DNS propagation is complete
- Check AWS Route 53 quotas haven't been exceeded
Remember that AWS sometimes caches DNS changes in their interface. If you don't see immediate changes, try logging out and back in or using a private browsing window.