agutoli / serverless-layers

Serverless.js plugin implementing AWS Lambda Layers, reducing lambda size, warm-up, and deployment time.
MIT License
229 stars 54 forks source link

Fix issue "TypeError: arn.replace is not a function" #53

Closed eballetbaz closed 3 years ago

eballetbaz commented 4 years ago

This is a fix for for issue https://github.com/agutoli/serverless-layers/issues/48

This is a simple fix that test if variable "arn" is of type "String", else convert to string This object "arn" is only used for login purpose, so converting to String is appropriate in any case

Note: when a layer defined in core serverless is used "arn" is an "Object" (and so this is the root cause of "TypeError: arn.replace is not a function"

agutoli commented 3 years ago

Thanks, @eballetbaz! I just pushed a new version 2.3.2.