Topic 1 Question 72
A developer creates a VPC named VPC-A that has public and private subnets. The developer also creates an Amazon RDS database inside the private subnet of VPC-A. To perform some queries, the developer creates an AWS Lambda function in the default VPC. The Lambda function has code to access the RDS database. When the Lambda function runs, an error message indicates that the function cannot connect to the RDS database.
How can the developer solve this problem?
Modify the RDS security group. Add a rule to allow traffic from all the ports from the VPC CIDR block.
Redeploy the Lambda function in the same subnet as the RDS instance. Ensure that the RDS security group allows traffic from the Lambda function.
Create a security group for the Lambda function. Add a new rule in the RDS security group to allow traffic from the new Lambda security group.
Create an IAM role. Attach a policy that allows access to the RDS database. Attach the role to the Lambda function.
ユーザの投票
コメント(5)
- 正解だと思う選択肢: B
Redeploy
👍 3Fyssy2023/04/17 - 正解だと思う選択肢: B
To solve this problem, the developer should redeploy the Lambda function in the same subnet as the RDS instance and ensure that the RDS security group allows traffic from the Lambda function. This will allow the Lambda function to access the RDS database within the private subnet of VPC-A. The developer should also make sure that the Lambda function is configured with the appropriate network settings and permissions to access resources within the VPC.
👍 3MrTee2023/04/25 - 正解だと思う選択肢: B
a - no because they rds and lambda on different vpc c - same as a d - same as a and c
b is the correct answer
👍 1Jamshif012023/05/14
シャッフルモード