Bird
0
0

Which of the following is the correct way to reference a Lambda layer in a function's AWS SAM template?

easy📝 Syntax Q3 of 15
AWS - Lambda
Which of the following is the correct way to reference a Lambda layer in a function's AWS SAM template?
ALayerARNs: [arn:aws:lambda:region:account-id:layer:layer-name:version]
BLayer: arn:aws:lambda:region:account-id:layer:layer-name:version
CLayers: [arn:aws:lambda:region:account-id:layer:layer-name:version]
DLayerList: arn:aws:lambda:region:account-id:layer:layer-name:version
Step-by-Step Solution
Solution:
  1. Step 1: Recall SAM syntax for layers

    In AWS SAM, the correct property to add layers is 'Layers' with a list of ARNs.
  2. Step 2: Verify correct syntax

    Layers: [arn:aws:lambda:region:account-id:layer:layer-name:version] uses 'Layers' with square brackets indicating a list, which is correct.
  3. Final Answer:

    Layers: [arn:aws:lambda:region:account-id:layer:layer-name:version] -> Option C
  4. Quick Check:

    SAM layers syntax = Layers list [OK]
Quick Trick: Use 'Layers' with a list of ARNs in SAM templates [OK]
Common Mistakes:
  • Using singular 'Layer' instead of 'Layers'
  • Missing brackets for list syntax
  • Incorrect property names like LayerARNs or LayerList

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes