Skill 104 · AWS Resilience Lifecycle
Subchapter 104.3
references/lifecycle-workflow.mdMarkdown10 KBView on GitHub
This SOP guides the integrated use of all three AWS resilience services (Resilience Hub v2, FIS, ARC) to achieve proven, operational resilience through a continuous Define → Test → Operate loop.
service_name (required): Name of the service going through the lifecycle service_arn (optional): Existing service ARN if already onboarded to Resilience Hub lifecycle_phase (optional, default: “all”): Which phase to execute — define, test, operate, or all aws_region (optional, default: “us-east-1”): Primary AWS region
Check for required tools and warn the user if any are missing.
Constraints:
call_aws tool is available (e.g., check the CLI is on PATH with command -v aws)command -v aws) is fine; do not make any AWS service callsaws sts assume-role) rather than long-lived IAM user access keys, since this lifecycle performs privileged and potentially destructive operations.lifecycle_phase parameter and execute ONLY the selected phase(s): “define” → Step 2 only; “test” → Step 3 only; “operate” → Step 4 only; “all” (default) → Steps 2–5 in orderlifecycle_phaseEstablish resilience targets and identify gaps through assessment.
Constraints:
Validate resilience through controlled fault-injection experiments.
Constraints:
ec2:TerminateInstances limited to tagged resources), never broad ec2:* or *, since FIS execution roles are high-privilege (they terminate instances, disrupt networking, etc.).aws fis start-experiment — never auto-start a fault-injection experiment, since it is destructive (terminates instances, disrupts networking). This mirrors the confirm-before-proceeding gate in Step 1.update-failure-mode-finding call is executed by the resilience-hub-getting-started skill (which owns resiliencehubv2 commands); this skill supplies the gate and the evidence comment, e.g. --status RESOLVED --comment "Validated via FIS experiment {experiment_id}. RTO: {actual_rto}s (target: {target_rto}s)"Configure operational recovery mechanisms for production use.
Constraints:
Establish ongoing resilience validation cadence.
Constraints:
Note: the CLI commands below illustrate what the delegated companion skills (
resilience-hub-getting-started,fault-injection-experiment-design,recovery-controller-setup) execute on behalf of this lifecycle skill. This skill orchestrates the phases and gates progression — it does not run these commands directly.
# Phase 1: Define
aws resiliencehubv2 create-policy --name "tier-1" --availability-slo target=99.99 \
--multi-az rtoInMinutes=5,rpoInMinutes=1,disasterRecoveryApproach=ACTIVE_ACTIVE \
--multi-region rtoInMinutes=30,rpoInMinutes=5,disasterRecoveryApproach=HOT_STANDBY
aws resiliencehubv2 start-failure-mode-assessment --service-arn {service_arn}
# Phase 2: Test (from NGRH finding "AZ failure not validated")
aws fis create-experiment-template --description "Validate checkout-api survives us-east-1a AZ failure" \
--actions '{"terminate-checkout":{"actionId":"aws:ec2:terminate-instances","targets":{"Instances":"checkout-instances"}}}' \
--targets '{"checkout-instances":{"resourceType":"aws:ec2:instance","selectionMode":"ALL","resourceTags":{"resilience:service":["checkout-api"]},"filters":[{"path":"Placement.AvailabilityZone","values":["us-east-1a"]}]}}' \
--stop-conditions '[{"source":"aws:cloudwatch:alarm","value":"arn:aws:cloudwatch:..."}]' \
--log-configuration '{"cloudWatchLogsConfiguration":{"logGroupArn":"arn:aws:logs:us-east-1:123456789012:log-group:/fis/checkout-api:*"},"logSchemaVersion":2}' \
--role-arn arn:aws:iam::123456789012:role/FISExperimentRole
# Enable experiment logging (above): the CloudWatch Logs group (or S3 bucket) receiving experiment
# logs SHOULD be KMS-encrypted (logs:AssociateKmsKey / SSE-KMS) — experiment logs can reveal
# infrastructure topology and failure modes.
# ⚠️ Present the fully-rendered template to the user and get explicit confirmation BEFORE the next line (see Step 3) — never auto-start a destructive experiment
aws fis start-experiment --experiment-template-id EXT123abc
# Phase 3: Operate
aws route53-recovery-control-config create-routing-control --cluster-arn {cluster_arn} --control-panel-arn {control_panel_arn} --routing-control-name checkout-us-east-1
aws arc-zonal-shift create-practice-run-configuration --resource-identifier {alb_arn} \
--outcome-alarms '[{"alarmIdentifier":"arn:aws:cloudwatch:...","type":"CLOUDWATCH"}]'
aws arc-zonal-shift update-zonal-autoshift-configuration --resource-identifier {alb_arn} --zonal-autoshift-status ENABLED
# Phase 4: Update finding after validation
aws resiliencehubv2 update-failure-mode-finding --service-arn {service_arn} --finding-id {id} --status RESOLVED \
--comment "Validated via FIS EXT123abc. RTO: 45s (target: 300s)"User wants to skip Phase 1 and go straight to testing Advise against this — without NGRH assessment, they don’t know which failure modes to test. Testing without targets means no way to measure success.
Findings show NOT_ACHIEVABLE but user wants to test anyway Explain that testing will confirm the failure but won’t fix it. Architecture changes are needed first. Testing validates that a fix works, not that a broken architecture is broken.
User has existing FIS experiments but no NGRH Start with Phase 1 to get a complete picture. Existing experiments can be mapped to findings after assessment, and gaps in coverage will be identified.