Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm not sure if it supports layers #507

Open
lxandrexl opened this issue Nov 22, 2023 · 0 comments
Open

I'm not sure if it supports layers #507

lxandrexl opened this issue Nov 22, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@lxandrexl
Copy link

Hello, I have used the library in a small project based on serverless framework + typescript and lambda layers
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

When I compile everything is fine but I realize that the file is too heavy since all the modules it uses are compiled and the layers I use are not useful, am I doing something wrong?
I leave part of my project in case someone knows what I could be doing wrong.

service: autoatencion-orchestration
frameworkVersion: "3"

package:
excludeDevDependencies: true
individually: true

provider:
name: aws
runtime: nodejs16.x
versionFunctions: false
stage: ${opt:stage, 'dev'}

plugins:

  • serverless-esbuild-layers
  • serverless-offline
  • serverless-plugin-utils
  • serverless-step-functions

layers:
BasicDependenciesNodeModules:
path: _layers/base
description: "Base dependencies"
compatibleRuntimes:
- nodejs16.x

SendEmailFnc:
handler: lambdas/orchestration/index.sendEmail
name: SendEmailFnc
layers:
- !Ref BasicDependenciesNodeModulesLambdaLayer

The lambda has a small logic to send SMS and when compiled it weighs around 2.75MB
@lxandrexl lxandrexl added the enhancement New feature or request label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant