Closed harukaxq closed 2 years ago
Hi @harukaxq 👋 thanks for raising this issue. It sounds like this has more to do with the CLI so I'm going to transfer this over for better support and feedback.
Hey @harukaxq, Thank you for reaching out. Currently, amplify does not support packaging assets out of the box. A feature request is currently is open for this https://github.com/aws-amplify/amplify-cli/issues/9055, Please do add your use case and queries in this thread.
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Not applicable
Amplify Categories
Not applicable
Environment information
Describe the bug
I want to create a Lambda with NodejsFunction in amplify's custom resource (CDK). But I can't complete it due to the following error
The following error is from cdk v2, but the same problem occurs with cdk v1
I got the same error when using Lambda and Asset.
I know I can do the same thing with amplify add function, but I want to use NodejsFunction for reusability and extensibility.
Expected behavior
Lambda is created correctly
Reproduction steps
Code Snippet
cdk-stack.ts
package.json
resource/lambda/src/index.js
resource/lambda/package.json
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response