The Lambda requires access to the Secrets Manager resource and RDS instance to rotate the password. Hence, it requires vpc_config{} with subnet_ids and security_group_ids. It also requires access to the Secrets Manager via aws_vpc_endpoint resource and appropriate aws_security_group_rule on port# 443.
Attach the managed policy AWSLambdaVPCAccessExecutionRole to the Lambda role.
The Lambda requires access to the Secrets Manager resource and RDS instance to rotate the password. Hence, it requires
vpc_config{}withsubnet_idsandsecurity_group_ids. It also requires access to the Secrets Manager viaaws_vpc_endpointresource and appropriateaws_security_group_ruleon port# 443.Attach the managed policy
AWSLambdaVPCAccessExecutionRoleto the Lambda role.