DVA-C02 Exam QuestionsBrowse all questions from this exam

DVA-C02 Exam - Question 116


A company has hundreds of AWS Lambda functions that the company's QA team needs to test by using the Lambda function URLs. A developer needs to configure the authentication of the Lambda functions to allow access so that the QA IAM group can invoke the Lambda functions by using the public URLs.

Which solution will meet these requirements?

Show Answer
Correct Answer: A

To enable the QA IAM group to access and invoke AWS Lambda functions using function URLs, it's necessary to use AWS_IAM authentication and to manage permissions appropriately. The first script should configure the Lambda function URLs with the AWS_IAM auth type to require authenticated access. The second script should create an IAM identity-based policy, granting invoke permissions for the Lambda functions to the QA IAM group. This setup ensures that only the designated QA group can securely invoke the Lambda functions, aligning with AWS best practices for access control and security.

Discussion

9 comments
Sign in to comment
MrTeeOption: A
Apr 22, 2023

Option A meets these requirements?

ppardav
Jun 25, 2023

https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html

jipark
Aug 3, 2023

create 'AWS_IAM auth type' -> Attach the policy to the QA IAM group

love777Option: C
Aug 23, 2023

Explanation: In this scenario, the QA team needs to test AWS Lambda functions using Lambda function URLs while ensuring proper authentication and access control. Here's why option C is the appropriate solution: Authentication Type: Using the AWS_IAM auth type for the Lambda function URLs ensures that the Lambda functions can be invoked only by users and roles that have the necessary IAM permissions. Identity-Based Policy: By creating an IAM identity-based policy, you grant permissions directly to the QA IAM group to invoke the Lambda functions using the Lambda function URLs. This provides fine-grained control over which IAM entities can access the functions. Option A uses the AWS_IAM auth type and creates a policy for the QA IAM group, which is a good direction. However, the creation of a policy that allows lambda:InvokeFunctionUrl for all Lambda function ARNs might grant excessive permissions.

dezoito
Oct 14, 2023

Why A grant excessive permissions? The policy will contain only the Lambda's ARNs wich the QA group should have access to.

[Removed]
Dec 10, 2023

pay attention to the wording of the answers: A - Run another script to create an IAM identity-based policy that allows the lambda:InvokeFunctionUrl action to all the Lambda function Amazon Resource Names (ARNs). *This option is very clear. You are creating an IAM identity based policy allowing access to invoke the function and then attaching this policy to the QA IAM group. C - Run another script to loop on the Lambda functions to create an IAM identity-based policy that allows the lambda:InvokeFunctionUrl action from the QA IAM group's Amazon Resource Name (ARN). *What does "Run another script to loop on the Lambda functions" What does this even mean?? are we doing some sort of while loop here? Wording for this option is very confusing and makes no sense to me. I go with A

Manel87
Dec 26, 2023

good thought!

konieczny69Option: C
Feb 1, 2024

I don't get all A answers. This is typical resource based policy that allows invoking a function by concrete principal - in this case its the QA role. For all those who vote for A - go ahead and create simple API Gateway with a lambda integration type. Then look at the resource based policy - lambda:InvokeFunction allowed by apigateway.amazonaws.com with ArnLike condition. ChatGTP also says C.

SD_CSOption: A
Feb 15, 2024

I have to go for A even though it appears both should suffice. I took this from AWS Documentation If you choose the AWS_IAM auth type, users who need to invoke your Lambda function URL must have the lambda:InvokeFunctionUrl permission. Depending on who makes the invocation request, you may have to grant this permission using a resource-based policy. If the principal making the request is in the same AWS account as the function URL, then the principal must either have lambda:InvokeFunctionUrl permissions in their identity-based policy, OR have permissions granted to them in the function's resource-based policy. AWS clearly states both should be good. The reason for selecting A is the wording is clear, loop on to lambda function to provide the permission was bit of confusing to me.

CrescentSharedOption: C
Feb 23, 2024

I don't know why so much A, but ins't A giving the access to all the lambda?

SerialiDrOption: A
Feb 29, 2024

This approach leverages AWS IAM authentication (AWS_IAM auth type) for Lambda function URLs, ensuring that only authenticated and authorized IAM entities can invoke the Lambda functions. By creating an IAM policy that specifies the lambda:InvokeFunctionUrl action and attaching it to the QA IAM group, you provide the necessary permissions for the QA team to invoke the Lambda functions securely. This method aligns with AWS best practices for security and access control, allowing for scalable and manageable access management across multiple Lambda functions.

65703c1Option: A
May 23, 2024

A is the correct answer.

Anandesh
Jul 2, 2024

I think the answer is B here, reason being the function should be invoked using public urls

AnandeshOption: A
Jul 12, 2024

Apologies again, please refer to the youtube link I shared earlier..correct ans is A