I'm trying to get latest Layer version with serverless framework by using serverless-latest-layer-version plugin. That plugin itself can get latest version of Layer but problem is whenever I made new deployment for both layers and function, layer version is always showing previous one of new layer version. Below is serverless.yml that to get latest version and applied it into function. Help me to suggest anything I missed to configure to latest layer version?
layers:
my-layers:
path: my-layers
name: ${opt:stage, 'development'}-my-layer
description: Save all common npm dependencies in single project
compatibleRuntimes:
- nodejs10.x
functions:
app:
handler: index.handler
layers:
- arn:aws:lambda:ap-southeast-1:#{AWS::AccountId}:layer:${opt:stage, 'development'}-my-layer:latest