exam questions

Exam AWS Certified Security - Specialty All Questions

View all questions & answers for the AWS Certified Security - Specialty exam

Exam AWS Certified Security - Specialty topic 1 question 384 discussion

Exam question from Amazon's AWS Certified Security - Specialty
Question #: 384
Topic #: 1
[All AWS Certified Security - Specialty Questions]

A company has two VPCs in the same AWS Region and in the same AWS account. Each VPC uses a CIDR block that does not overlap with the CIDR block of the other VPC. One VPC contains AWS Lambda functions that run inside a subnet that accesses the internet through a NAT gateway. The Lambda functions require access to a publicly accessible Amazon Aurora MySQL database that is running in the other VPC.

A security engineer determines that the Aurora database uses a security group rule that allows connections from the NAT gateway IP address that the Lambda functions use. The company’s security policy states that no database should be publicly accessible.

What is the MOST secure way that the security engineer can provide the Lambda functions with access to the Aurora database?

  • A. Move the Aurora database into a private subnet that has no internet access routes in the database's current VPC. Configure the Lambda functions to use the Aurora database’s new private IP address to access the database. Configure the Aurora database's security group to allow access from the private IP addresses of the Lambda functions.
  • B. Establish a VPC endpoint between the two VPCs. In the Aurora database's VPC, configure a service VPC endpoint for Amazon RDS. In the Lambda functions’ VPC, configure an interface VPC endpoint that uses the service endpoint in the Aurora database's VPC. Configure the service endpoint to allow connections from the Lambda functions
  • C. Establish an AWS Direct Connect interface between the VPCs. Configure the Lambda functions to use a new route table that accesses the Aurora database through the Direct Connect interface. Configure the Aurora database's security group to allow access from the Direct Connect interface IP address,
  • D. Move the Lambda functions into a public subnet in their VPC. Move the Aurora database into a private subnet in its VPC. Configure the Lambda functions to use the Aurora database's new private IP address to access the database. Configure the Aurora database to allow access from the public IP addresses of the Lambda functions.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
tainh
Highly Voted 2 years, 4 months ago
Selected Answer: B
B is correct https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc-endpoints.html
upvoted 8 times
...
Toptip
Most Recent 1 year, 10 months ago
Selected Answer: B
Only B makes sense to me... VPC endpoint
upvoted 2 times
...
6_8ftwin
1 year, 10 months ago
B https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/vpc-interface-endpoints.html "All RDS API operations relevant to managing Amazon Aurora resources are available from your VPC using AWS PrivateLink."
upvoted 1 times
...
ITGURU51
1 year, 11 months ago
A VPC endpoint is considered more secure than other options because it allows you to privately connect your VPC to supported AWS services and VPC endpoint services powered by AWS PrivateLink without requiring an internet gateway, NAT device, VPN connection, or AWS Direct Connect connection. This means that traffic between your VPC and the service does not leave the Amazon network, reducing the risk of data interception by malicious actors .
upvoted 1 times
...
Ghouley
1 year, 12 months ago
I would say A as it is the only answer that makes sense while addressing the need for the RDS to be private
upvoted 1 times
...
isokalau
2 years ago
Selected Answer: A
The MOST secure way that the security engineer can provide the Lambda functions with access to the Aurora database is option A: Move the Aurora database into a private subnet that has no internet access routes in the database's current VPC. Configure the Lambda functions to use the Aurora database’s new private IP address to access the database. Configure the Aurora database's security group to allow access from the private IP addresses of the Lambda functions. This option ensures that the Aurora database is not publicly accessible by moving it to a private subnet with no internet access routes. The Lambda functions can then access the database using its private IP address. The security group for the Aurora database can be updated to allow access only from the private IP addresses of the Lambda functions, which limits access to the database to only the Lambda functions that require it.
upvoted 2 times
Green53
1 year, 10 months ago
That's all correct, except for one problem; how does Lamdba access the database in the other VPC? There is no connection between them once it can't go over the public network. You'd either require a peering connection or VPC Endpoint service for A to work. A VPC endpoint is a connection from your VPC to a specific service provided by AWS or by someone else. The VPC endpoint is exposed as a private IP address within your VPC, accessible using a private DNS name. VPC endpoints are most commonly used to make AWS API requests from a VPC, without going onto the public internet.
upvoted 1 times
...
...
Sai123
2 years ago
The question says no DB should be publicly accessable, with option B the DB is still punlicly accessible. So doesnt the answer should be A?
upvoted 2 times
Sai123
2 years ago
Never mind there is no peering between VPC so A cannot be correct.
upvoted 1 times
...
...
Nocky24
2 years, 3 months ago
Selected Answer: B
Would have said A if there was a VPC peering, so went with B.
upvoted 2 times
...
secdaddy
2 years, 3 months ago
Selected Answer: A
"publicly accessible Amazon Aurora MySQL database" = noncompliant as "company’s security policy states that no database should be publicly accessible" Unless I am mistaken, nothing in B makes this database publicly inaccessible ? A makes the database publicly inaccessible and meets the 'MOST secure way' requirement. C and D are nonsensical
upvoted 2 times
secdaddy
2 years, 3 months ago
Also why would Lambda need to access RDS directly? "In the Lambda functions’ VPC, con+gure an interface VPC endpoint that uses the service endpoint in the Aurora database's VPC" Wouldn't Lambda access the Aurora DB instances in the VPC and those instances would then access RDS? Has anyone actually worked with this stuff and can comment please ?
upvoted 1 times
secdaddy
2 years, 3 months ago
Good article here : https://aws.amazon.com/blogs/compute/announcing-improved-vpc-networking-for-aws-lambda-functions/
upvoted 1 times
...
...
...
sahanpere
2 years, 3 months ago
Selected Answer: B
B is the answer. Both services can access through VPC's using the VPC endpoints. https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc-endpoints.html https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc-endpoints.html
upvoted 1 times
...
secdaddy
2 years, 3 months ago
I guess the problem with A is the IP addresses of the Lambda functions as sources? The answer says to allow access but it doesn't say we need to actually know the IP addresses so maybe this is okay as when we configure a Lambda function to access the Aurora subnet we choose a security group during configuration ? B confuses me. I'm ok with the RDS service endpoint in the Aurora private subnet but aren't Lambda functions in a VPC owned by the Lambda service? Are we even able to configure an interface VPC endpoint in the Lambda service owned VPC? It looks to me like connectivity from the Lambda service owned VPC to an account VPC (where the Aurora instances are) would use Hyperplane ENIs created by Lambda as needed. https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html https://docs.aws.amazon.com/lambda/latest/dg/foundation-networking.html
upvoted 1 times
...
D2
2 years, 4 months ago
Answer B
upvoted 2 times
...
AdamWest
2 years, 5 months ago
Selected Answer: B
I also have B as the answer
upvoted 2 times
...
luisfsm_111
2 years, 5 months ago
Selected Answer: B
I'd say B by elimination...
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago