A developer is configuring an AWS CodeDeploy blue/green deployment for a microservice on Amazon ECS. The deployment must execute a validation Lambda function named `run-integration-tests` immediately after the load balancer routes test traffic to the replacement task set, but before production traffic is shifted. Additionally, the Lambda function needs to retrieve a database credential that must be rotated automatically every 30 days.
Here is a snippet of the AppSpec file being used:
yaml
version: 0.0
Resources:
- TargetService:
Type: AWS::ECS::Service
Properties:
TaskDefinition: "arn:aws:ecs:us-east-1:123456789012:task-definition/api-service:2"
LoadBalancerInfo:
ContainerName: "api"
ContainerPort: 8080
Hooks:
- <HOOK_NAME>: "arn:aws:lambda:us-east-1:123456789012:function:run-integration-tests"
Which combination of CodeDeploy lifecycle hook and AWS service configuration will satisfy these requirements?
- AHook: ValidateService; Service: AWS Secrets Manager
- Hook: AfterAllowTestTraffic; Service: AWS Secrets ManagerCevap
- CHook: AfterAllowTestTraffic; Service: AWS Systems Manager Parameter Store
- DHook: BeforeAllowTraffic; Service: AWS Secrets Manager, with the CodeDeploy service role trusting the ecs.amazonaws.com service principal