Cannot add ManagedPolicy to the lambda that is created in the same stack – Amazon web services
I'm new to AWS CDK and I'm trying to set up lambda with few AWS managed policies. Lambda configuration, this.lambdaFunction = new Function(this, 'LambdaName', { functionName: 'LambdaName', description: `Timestamp: ${new Date().toISOString()} `, code: ..., handler: '...', memorySize: 512, timeout: Duration.seconds(30),…