Currently deploying to AWS using SAM. When referencing a Layer SAM doesnt seem to update the variable correctly?
template.yaml
Parameters:
HelperFunctionsLayer:
Type: String
Default: layer-helper-functions:69
...
Outputs:
HelperFunctionsLayer:
Value: !Sub 'arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:layer:${HelperFunctionsLayer}'
Output from sam deploy:
-------------------------------------------------------------------------------------------------
Outputs
-------------------------------------------------------------------------------------------------
Key HelperFunctionsLayer
Description -
Value arn:aws:lambda:us-east-1:000000000000:layer:layer-helper-functions:22
-------------------------------------------------------------------------------------------------
Notice the version has not updated. We are deploying via GitLab runner could a version of the config be kept and not updated somewhere?
EDIT: Have now also reproduced locally without GitLab...
EDIT1: In the deployment the function does get updated but the version does not change.
The only current way we can this to work is to name the layer explicitly however this is referenced quite a few times in the template.yaml