ANS-C01 Question 324
Single answerYour organization is using a serverless architecture to manage network configurations dynamically in AWS. A requirement arises to automate the creation of VPC peering connections between accounts whenever a new VPC is created. Which approach would best implement this event-driven network automation?
- A
Use Amazon EventBridge to detect VPC creation events and trigger an AWS Lambda function to create VPC peering connections.
- B
Manually monitor CloudTrail logs for VPC creation events and initiate VPC peering connection creation using the AWS CLI.
- C
Use AWS Config to automatically create VPC peering connections when it detects a new VPC.
- D
Deploy an EC2 instance to monitor VPC creation events and execute a script to establish VPC peering connections.
Show answer and explanation
Correct answer: A
Explanation
Event-driven network automation leverages AWS services to automate tasks in response to specific events. Using Amazon EventBridge, you can detect the creation of VPCs in real-time and trigger an AWS Lambda function to handle the creation of VPC peering connections. This approach is serverless, scalable, and aligns with the principles of event-driven automation. Other options either introduce unnecessary manual effort, are not suitable for automation, or are resource-intensive.
- A. Correct.
Amazon EventBridge is designed for event-driven automation. It can detect VPC creation events and trigger an AWS Lambda function to programmatically create VPC peering connections, making it the most efficient and scalable solution.
- B. Incorrect.
Manually monitoring CloudTrail logs adds significant operational overhead, lacks real-time automation, and does not align with event-driven automation principles.
- C. Incorrect.
AWS Config is a service for compliance and monitoring, but it does not natively automate the creation of resources like VPC peering connections. It is not suitable for this scenario.
- D. Incorrect.
Deploying an EC2 instance to monitor events is resource-intensive and requires custom scripting, which is less efficient and scalable compared to serverless services like EventBridge and Lambda.