dherault / serverless-offline

Emulate AWS λ and API Gateway locally when developing your Serverless project
MIT License
5.19k stars 796 forks source link

fix(layers): retrieve layer using ARN #1684

Closed ivansamartino closed 2 weeks ago

ivansamartino commented 1 year ago

Description

With this change the layerArn parameter is parsed to identify whether it points to the latest version of the layer or specific version and downloads it using the API method GetLayerVersionByArnCommand which does not require a separate input parameter to specify the layer version

Motivation and Context

The aws-sdk method GetLayerVersionCommand was not passing the VersionNumber input parameter, therefore, downloading layers was not working properly.

Some people were reporting issues with the download of layers like in #1263

How Has This Been Tested?

The feature has been tested using the following repository: serverless poc

dherault commented 2 weeks ago

Closing because this PR has been open for too long. Sorry it was not merged, please publish a newer PR if you still want this behavior in the codebase.