We are using AWS SAM to build and manage an AWS Layer. The same SAM template can easily associate the latest version to lambda functions which are also managed by this template. However, we have other Lambda functions that are managed by other CloudFormation/SAM templates and I don't know latest version (ARN)
This is what we use in the SAM template to associate the layer
Globals:
Function:
Layers:
- !Ref ToolkitLayer
How do I determine the latest version programmatically from a completely different CloudFormation/SAM template? I thought about using an SSM Parameter since it appears CloudFormation can dynamically pull a value. The issue here is that the SSM Parameter also has a version, same issue.