Open rupe120 opened 1 week ago
Hi @rupe120 , thanks for reaching out.
I tried to repro the issue with this minimal code of Lambda node js function and its succeeding with synth as well as deployment. Sharing the details -
Code -
const dlQueue = new sqs.Queue(this, 'dlQueue', {
queueName: 'dlQueue'
});
const testGetTextractTextDetectionLambda = new NodejsFunction(this, 'test-get-textract-text-detection',
{
codeSigningConfig: undefined,
functionName:'test-get-textract-text-detection',
description: `Get Textract text detection`,
runtime: Runtime.NODEJS_20_X,
timeout: cdk.Duration.minutes(15),
entry: 'lib/index.ts',
handler: 'index.handler',
tracing: Tracing.ACTIVE,
insightsVersion: LambdaInsightsVersion.VERSION_1_0_143_0,
deadLetterQueue: dlQueue,
deadLetterQueueEnabled: true,
memorySize: 1024,
environment: {
NODE_ENV: "test"
}
});
const sourceBucket = new s3.Bucket(this, 'sourceBuckettestDeploy', {
bucketName: 'source-bucket-test-deploy',
removalPolicy: cdk.RemovalPolicy.DESTROY
});
sourceBucket.grantReadWrite(testGetTextractTextDetectionLambda);
testGetTextractTextDetectionLambda.addToRolePolicy(new PolicyStatement(
{
actions: [
'textract:GetDocumentTextDetection'
],
resources: ['*']
}
));
//added these statement after 1st synth
new cdk.CfnOutput(this, 'testGetTextractTextDetectionLambda', { value: testGetTextractTextDetectionLambda.functionArn });
new cdk.CfnOutput(this, 'sourceBucket', { value: sourceBucket.bucketName });
}
the code synthesized successfully and I am able to see the cdk diff
as well -
used cdk version - 2.166.0 Node - v20.17.0
As I am not able to repro the scenario, could you please share the minimal self contained code to repro the issue. Also I would suggest you to check the NodeJS version and CDK version as well.
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Hi @rupe120 , thanks for reaching out.
I tried to repro the issue with this minimal code of Lambda node js function and its succeeding with synth as well as deployment. Sharing the details -
Code -
const dlQueue = new sqs.Queue(this, 'dlQueue', { queueName: 'dlQueue' }); const testGetTextractTextDetectionLambda = new NodejsFunction(this, 'test-get-textract-text-detection', { codeSigningConfig: undefined, functionName:'test-get-textract-text-detection', description: `Get Textract text detection`, runtime: Runtime.NODEJS_20_X, timeout: cdk.Duration.minutes(15), entry: 'lib/index.ts', handler: 'index.handler', tracing: Tracing.ACTIVE, insightsVersion: LambdaInsightsVersion.VERSION_1_0_143_0, deadLetterQueue: dlQueue, deadLetterQueueEnabled: true, memorySize: 1024, environment: { NODE_ENV: "test" } }); const sourceBucket = new s3.Bucket(this, 'sourceBuckettestDeploy', { bucketName: 'source-bucket-test-deploy', removalPolicy: cdk.RemovalPolicy.DESTROY }); sourceBucket.grantReadWrite(testGetTextractTextDetectionLambda); testGetTextractTextDetectionLambda.addToRolePolicy(new PolicyStatement( { actions: [ 'textract:GetDocumentTextDetection' ], resources: ['*'] } )); //added these statement after 1st synth new cdk.CfnOutput(this, 'testGetTextractTextDetectionLambda', { value: testGetTextractTextDetectionLambda.functionArn }); new cdk.CfnOutput(this, 'sourceBucket', { value: sourceBucket.bucketName }); }
the code synthesized successfully and I am able to see the
cdk diff
as well -used cdk version - 2.166.0 Node - v20.17.0
As I am not able to repro the scenario, could you please share the minimal self contained code to repro the issue. Also I would suggest you to check the NodeJS version and CDK version as well.
This seems to be a Windows issue. It works fine, using the same path in WSL
Describe the bug
cdk synth
fails if a prior synth exists incdk.out
with the error:Regression Issue
Last Known Working CDK Version
Unknown, I tried prior versions and was not able to find one that worked. This was working for me about a week ago and then suddenly stopped.
Expected Behavior
A successful synth
Current Behavior
See description
Reproduction Steps
I have not had the time to rebuild a project to see if it happens with the lambda definition in a fresh project.
This is the lambda definition though:
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.166.0
Framework Version
2.166.0
Node.js Version
v20.10.0
OS
Windows 11 Enterprise 22621.4169
Language
TypeScript
Language Version
4.9.5
Other information
No response