An operations engineer is setting up scheduled credential updates for an Amazon RDS for MySQL database using AWS Secrets Manager. Both the database instance and the Lambda function performing the rotation are deployed inside private subnets of a VPC that lacks a NAT gateway and internet connectivity. The initial test of the rotation fails because the Lambda function cannot access either the database or the Secrets Manager API. Which of the following actions should the administrator take to resolve this issue? (Select TWO.)
- Configure an interface VPC endpoint (AWS PrivateLink) for Secrets Manager in the VPC, and ensure the Lambda function's security group allows outbound traffic to the endpoint's security group on port 443.Cevap
- BConfigure a gateway VPC endpoint for Secrets Manager in the VPC and associate it with the route tables of the private subnets.
- Configure the RDS for MySQL database security group to allow inbound traffic on port 3306 from the security group assigned to the Lambda rotation function.Cevap
- DModify the key policy of the default AWS managed key aws/secretsmanager to explicitly grant the Lambda execution role the kms:Decrypt and kms:DescribeKey permissions.
- EAttach an internet gateway to the VPC, and add a route in the private subnet route tables targeting the internet gateway to allow the Lambda function to reach the public Secrets Manager endpoint.
Cevap
Configure an interface VPC endpoint for Secrets Manager and allow HTTPS traffic, and configure the RDS database security group to allow inbound port 3306 traffic from the Lambda security group.
To successfully rotate secrets for a database in a private subnet without internet access, two network communication paths must be established. First, the Lambda rotation function needs to communicate with AWS Secrets Manager. Since Secrets Manager is a public service and there is no NAT gateway, the administrator must create an interface VPC endpoint (AWS PrivateLink) for Secrets Manager in the VPC and ensure the Lambda's security group allows outbound HTTPS traffic to the endpoint. Second, the Lambda function must connect to the database to alter the user credentials. This requires configuring the RDS instance's security group to allow inbound database traffic on port 3306 from the Lambda function's security group.
Adım Adım Çözüm
Anahtar Kavram
AWS Secrets Manager automated rotation in a private VPC requires network paths to both the database and Secrets Manager. Private communication with Secrets Manager is achieved via an interface VPC endpoint, while security groups must be configured to permit traffic between the rotation Lambda function and the target database.
Tahmini Süre:2m 0s