计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
aws-route53【效率与协作】"Configures DNS routing with Route 53 for domain registration, health" checks, failover, and traffic management with private hosted zones.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
name: aws-route53 compatibility: opencode completeness: 95 content-types:
Configure DNS routing, domain management, and health checks with support for failover, weighted routing, and geolocation-based policies.
Use Route 53 when:
Primary Purpose: Provide highly available DNS service with health checking, failover, and advanced routing policies.
Common Use Cases:
AWSTemplateFormatVersion: '2010-09-09'
Resources:
# Primary ALB Health Check
PrimaryHealthCheck:
Type: AWS::Route53::HealthCheck
Properties:
Type: HTTPS
ResourcePath: /health
FullyQualifiedDomainName: primary.example.com
Port: 443
RequestInterval: 30
FailureThreshold: 3
HealthCheckTags:
- Key: Name
Value: primary-health-check
# Secondary ALB Health Check
SecondaryHealthCheck:
Type: AWS::Route53::HealthCheck
Properties:
Type: HTTPS
ResourcePath: /health
FullyQualifiedDomainName: secondary.example.com
Port: 443
RequestInterval: 30
FailureThreshold: 3
HealthCheckTags:
- Key: Name
Value: secondary-health-check
# Hosted Zone
HostedZone:
Type: AWS::Route53::HostedZone
Properties:
Name: example.com
HostedZoneConfig:
Comment: Primary hosted zone
Tags:
- Key: Name
Value: example-zone
# Primary A Record with Failover
PrimaryRecord:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneId: !Ref HostedZone
Name: api.example.com
Type: A
AliasTarget:
HostedZoneId: Z35SXDOTRQ7X7K # ALB zone ID
DNSName: primary-alb-123456789.us-east-1.elb.amazonaws.com
EvaluateTargetHealth: true
SetIdentifier: Primary
Failover: PRIMARY
HealthCheckId: !Ref PrimaryHealthCheck
# Secondary A Record with Failover
SecondaryRecord:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneId: !Ref HostedZone
Name: api.example.com
Type: A
AliasTarget:
HostedZoneId: Z35SXDOTRQ7X7K
DNSName: secondary-alb-987654321.eu-west-1.elb.amazonaws.com
EvaluateTargetHealth: false
SetIdentifier: Secondary
Failover: SECONDARY
# CloudWatch Alarm for Health Check
HealthCheckAlarm:
Type: AWS::CloudWatch::Alarm
Properties:
AlarmName: route53-health-check-failed
MetricName: HealthCheckStatus
Namespace: AWS/Route53
Statistic: Minimum
Period: 60
EvaluationPeriods: 2
Threshold: 1
ComparisonOperator: LessThanThreshold
Dimensions:
- Name: HealthCheckId
Value: !Ref PrimaryHealthCheck
Outputs:
NameServers:
Value: !Join
- ','
- !GetAtt HostedZone.NameServers
Description: Route 53 name servers
Key Elements:
Resources:
# 90% traffic to blue (current version)
BlueRecord:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneId: !Ref HostedZone
Name: app.example.com
Type: A
AliasTarget:
HostedZoneId: Z35SXDOTRQ7X7K
DNSName: blue-alb.us-east-1.elb.amazonaws.com
EvaluateTargetHealth: true
SetIdentifier: Blue
Weight: 90
HealthCheckId: !Ref BlueHealthCheck
# 10% traffic to green (new version)
GreenRecord:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneId: !Ref HostedZone
Name: app.example.com
Type: A
AliasTarget:
HostedZoneId: Z35SXDOTRQ7X7K
DNSName: green-alb.us-east-1.elb.amazonaws.com
EvaluateTargetHealth: true
SetIdentifier: Green
Weight: 10
HealthCheckId: !Ref GreenHealthCheck
Key Elements:
Resources:
# US Region
USRecord:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneId: !Ref HostedZone
Name: cdn.example.com
Type: A
AliasTarget:
HostedZoneId: Z35SXDOTRQ7X7K
DNSName: us-alb.us-east-1.elb.amazonaws.com
EvaluateTargetHealth: true
SetIdentifier: US
GeoLocation:
CountryCode: US
# EU Region
EURecord:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneId: !Ref HostedZone
Name: cdn.example.com
Type: A
AliasTarget:
HostedZoneId: Z35SXDOTRQ7X7K
DNSName: eu-alb.eu-west-1.elb.amazonaws.com
EvaluateTargetHealth: true
SetIdentifier: EU
GeoLocation:
ContinentCode: EU
# Default (catch-all)
DefaultRecord:
Type: AWS::Route53::RecordSet
Properties:
HostedZoneId: !Ref HostedZone
Name: cdn.example.com
Type: A
AliasTarget:
HostedZoneId: Z35SXDOTRQ7X7K
DNSName: global-alb.us-east-1.elb.amazonaws.com
EvaluateTargetHealth: true
SetIdentifier: Default
GeoLocation:
CountryCode: '*'
Key Elements:
Route 53 + CloudFront:
Route 53 + Load Balancers:
CloudWatch + Route 53:
Problem: DNS changes slow to propagate; delays failover.
Solution:
Problem: Unhealthy endpoints still receive traffic.
Solution:
Problem: Failed endpoints cause user errors.
Solution:
Problem: Failover doesn't work when actually needed.
Solution:
| Category | Best Practice |
|---|---|
| Routing | Health checks for failover; weighted for canary |
| TTL | Short for critical; long for stable |
| Health Checks | 30s interval; 3 failure threshold |
| Monitoring | CloudWatch alarms on check failures |
| Testing | Regular failover drills |
| Skill | Purpose |
|---|---|
cncf-aws-elb | Failover targets (ALB/NLB) |
cncf-aws-cloudfront | CDN endpoints for routing |
cncf-aws-cloudwatch | Health check monitoring |
Assess Requirements — Understand the use case, scale, integration needs, and existing infrastructure. Checkpoint: Document requirements, constraints, and success criteria.
Design Architecture — Plan component interactions, data flow, and deployment strategy using cloud-native best practices. Checkpoint: Verify the architecture addresses all requirements and follows CNCF conventions.
Implement & Configure — Create manifests, configurations, and deployment scripts. Include resource limits, health checks, and observability hooks. Checkpoint: Validate all YAML against schema and test in a staging environment.
Deploy & Monitor — Apply manifests to the cluster, verify component health, and confirm observability is working. Checkpoint: Confirm all pods/services are running, probes passing, and metrics/alerts configured.
Authoritative documentation links for this skill's domain. The model follows markdown links at load time to resolve external references and inline content.