Does the layer inherit the Lambda function's runtime version if I don't choose a compatible runtime when I create the layer?

0

We use Node.js runtimes for our Lambda functions. When I create a layer, the compatible runtime selection is optional. If I don't set the value, does the layer inherit the runtime version from the Lambda function? Is it mentioned in any Lambda documentation?

질문됨 한 달 전101회 조회
1개 답변
1
수락된 답변

The compatible runtimes parameter when creating a layer determines which layers are displayed when adding a layer to a function, but does not affect actual layer compatibility. If no compatible runtimes are specified for a layer, Lambda will invoke functions using that layer against any of Lambda's supported runtimes. The "compatible runtimes" property does not enforce true compatibility at the runtime level - it is simply metadata that controls layer discoverability.

AWS
Jainam
답변함 한 달 전
profile picture
전문가
검토됨 25일 전
profile picture
전문가
검토됨 한 달 전
  • Thanks for the response. Would like to clarify with an example here. If the Lambda function's runtime is Node.js 20.x but the compatible runtimes of the layer is 16.x, when the Lambda function is invoked, does the code in the layer run on 20.x or 16.x?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠