Deploying Lambda via CDK inside Amplify App Error

0

I am attempting to deploy a lambda inside an Amplify app with AWS CDK. My CDK code looks like this:

const initiateExportJobFunction = new lambda.Function(
       this,
       `InitiateExportJobFunction`,
       {
         runtime: lambda.Runtime.NODEJS_14_X,
         handler: "index.handler",
         code: lambda.Code.fromAsset(
           path.join(__dirname, "..", "InitiateExportJobFunction")
         ),
       }
     );

The error message is: "Parameters: [AssetParameters97f3093890bbef669e9ff0dafda5999980162ae2645144b4946af24866fc3448S3BucketEF40089D, AssetParameters97f3093890bbef669e9ff0dafda5999980162ae2645144b4946af24866fc3448S3VersionKeyE028CAFF, AssetParameters97f3093890bbef669e9ff0dafda5999980162ae2645144b4946af24866fc3448ArtifactHash3276AB2A] must have values"

This should be a very simple operation. I do not see what I'm doing wrong. Any ideas?

1개 답변
0

It seems it is not finding the Lambda package using the path.

 path.join(__dirname, "..", "InitiateExportJobFunction"

Try the following example: https://cdkworkshop.com/40-dotnet/30-hello-cdk/200-lambda.html

AWS
vtjean
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠