Which of the following are correct ARNs for a Lambda function? (choose 3 options)
Click on the arrows to vote for the correct answer
A. B. C. D. E.Answer: A, B, D.
Sure, I'd be happy to help you out with this question!
An Amazon Resource Name (ARN) is a unique identifier that is used to identify and access AWS resources. In the case of Lambda functions, the ARN includes the function name, AWS region, AWS account ID, and version or alias (if applicable).
Let's look at the options one by one:
A. arn:aws:lambda:aws-region:acct-id:function:helloworld:$LATEST
This is a valid ARN for a Lambda function. The $LATEST
refers to the latest version of the function code.
B. arn:aws:lambda:aws-region:acct-id:function:helloworld
This is also a valid ARN for a Lambda function. It refers to the specific version of the function, as no version or alias is specified.
C. arn:aws:lambda:aws-region:acct-id:function:helloworld/$LATEST
This is not a valid ARN for a Lambda function. The /
character is not allowed in the function name.
D. arn:aws:lambda:aws-region:acct-id:function:helloworld:PROD
This is a valid ARN for a Lambda function, but it refers to a specific alias (in this case, PROD
) of the function. If the function does not have an alias named PROD
, then this ARN is not valid.
E. arn:aws:lambda:aws-region:acct-id:function:helloworld/1
This is not a valid ARN for a Lambda function. The /
character is not allowed in the function name.
Therefore, the correct answers are A, B, and D.