I just inherited a Gen 2 project. This is a first for me. I've previously only used Gen 1 and used mainly CDK to generate resources. The project I inherited, when deployed, has a function that in the AWS Lambda console has a ton of extra code. It looks like it was bundled and saved back upon itself so all imports are now in the index.mjs file. Just curious if anyone can tell me if thats normal? I'm getting an error "exports is not defined" when its invoked so I wanted to make sure I know where to taget my efforts.
#Lambda Function code has a lot more than specified
2 messages · Page 1 of 1 (latest)
👋 the handler code is bundled with esbuild and has a snippet injected to resolve secrets. the error is interesting though and may be coming from another package, what is the output of npx ampx info and what packages are being used in the handler code?