Complete the code to specify the AWS service that helps recover from infrastructure failures automatically.
Use AWS [1] to automatically replace unhealthy instances in your application.
AWS Auto Scaling automatically replaces unhealthy instances to maintain application availability.
Complete the code to choose the AWS feature that helps distribute traffic across multiple resources.
Use [1] to balance incoming traffic and improve fault tolerance.
Elastic Load Balancer distributes traffic across multiple targets to increase reliability.
Fix the error in the code to correctly enable multi-AZ deployment for high availability.
Create an RDS instance with MultiAZ set to [1].
The MultiAZ parameter requires a boolean True (capital T) to enable multi-AZ deployment.
Fill both blanks to create a CloudWatch alarm that triggers when CPU usage is above 80%.
alarm = cloudwatch.put_metric_alarm(MetricName='CPUUtilization', Threshold=[1], ComparisonOperator='[2]')
The threshold should be 80 and the comparison operator 'GreaterThanThreshold' to alert when CPU usage exceeds 80%.
Fill all three blanks to define a lifecycle policy that transitions objects to Glacier after 30 days and expires after 365 days.
lifecycle = {
'Rules': [{
'ID': 'ArchiveRule',
'Status': '[1]',
'Transitions': [{'Days': [2], 'StorageClass': '[3]'}],
'Expiration': {'Days': 365}
}]
}The lifecycle rule must be 'Enabled', transition after 30 days, and use 'GLACIER' storage class for archiving.