1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
0
You did not specify which version of SAM CLI you were using. The information I am providing below is based on SAM CLI version 1.55.0.
So your layer code doesn't really follow your local hierarchy or include the name of the layer itself. The warning you get of the missing package.json is a warning that tells you the code is not been placed where you expect.
You need to remove the nodejs folder so your code looks like this:
├── layers/
│ └── SQLLayer/
│ ├── package.json
│ └── index.ts
This will create a layer with the current hierarchy
├── nodejs/
│ ├── package.json
│ └── index.ts
In your actual Lamabda function this will look like this
├── /opt/
│ └── nodejs/
│ ├── package.json
│ └── index.ts
beantwortet vor einem Jahr
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 3 Jahren
- AWS OFFICIALAktualisiert vor 3 Jahren