aws-solutions-library-samples / guidance-for-carbon-data-lake-on-aws

This Guidance, with the sample code, can be used to deploy a carbon data lake to the AWS Cloud using an AWS Cloud Development Kit (AWS CDK)
https://aws.amazon.com/solutions/guidance/carbon-data-lake-on-aws/
Apache License 2.0
21 stars 14 forks source link

AwsSolutions-L1: The non-container Lambda function is not configured to use the latest runtime version. #25

Closed mathieu-benoit closed 1 year ago

mathieu-benoit commented 1 year ago

When running cdk synth, here is the errors you will get:

[Error at /LineageStack/cdlDataLineageInput/Resource] AwsSolutions-L1: The non-container Lambda function is not configured to use the latest runtime version. Use the latest available runtime for the targeted language to avoid technical debt. Runtimes specific to a language or framework version are deprecated when the version reaches end of life. This rule only applies to non-container Lambda functions.

[Error at /LineageStack/cdlDataLineageHandler/Resource] AwsSolutions-L1: The non-container Lambda function is not configured to use the latest runtime version. Use the latest available runtime for the targeted language to avoid technical debt. Runtimes specific to a language or framework version are deprecated when the version reaches end of life. This rule only applies to non-container Lambda functions.

[Error at /LineageStack/cdlDataLineageTraceHandler/Resource] AwsSolutions-L1: The non-container Lambda function is not configured to use the latest runtime version. Use the latest available runtime for the targeted language to avoid technical debt. Runtimes specific to a language or framework version are deprecated when the version reaches end of life. This rule only applies to non-container Lambda functions.

[Error at /TestStack/CalculatorTestLambda/Resource] AwsSolutions-L1: The non-container Lambda function is not configured to use the latest runtime version. Use the latest available runtime for the targeted language to avoid technical debt. Runtimes specific to a language or framework version are deprecated when the version reaches end of life. This rule only applies to non-container Lambda functions.

[Error at /TestStack/PipelineTestLambda/Resource] AwsSolutions-L1: The non-container Lambda function is not configured to use the latest runtime version. Use the latest available runtime for the targeted language to avoid technical debt. Runtimes specific to a language or framework version are deprecated when the version reaches end of life. This rule only applies to non-container Lambda functions.

Was this supposed to be fixed with https://github.com/aws-solutions-library-samples/guidance-for-carbon-data-lake-on-aws/issues/16?

samwardbiddle commented 1 year ago

Thanks for pointing this out @mathieu-benoit -- can you confirm whether you have pulled from latest /main branch?

Yes you are correct that #16 was intended to fix this. If the issue is still coming up we can address immediately. Thanks for bringing to our attention.

mathieu-benoit commented 1 year ago

Hi @samwardbiddle yes I'm in main branch + this change https://github.com/aws-solutions-library-samples/guidance-for-carbon-data-lake-on-aws/pull/24. Not sure if I'm missing anything though:

npm ci
npm run build
cdk synth

Thanks!

samwardbiddle commented 1 year ago

@mathieu-benoit that is all correct. And you ran git pull as well to make sure you're working from latest? I am thinking yes, just want to double check.

mathieu-benoit commented 1 year ago

Yep, I confirm that I'm using this directly from a fresh git clone with this change https://github.com/aws-solutions-library-samples/guidance-for-carbon-data-lake-on-aws/pull/24.

mathieu-benoit commented 1 year ago

Hey @samwardbiddle not sure #26 is fixing the issue. I edited my answer above, but typically in addition to the git clone, I also needed to do https://github.com/aws-solutions-library-samples/guidance-for-carbon-data-lake-on-aws/pull/24. But I still have the issue.

samwardbiddle commented 1 year ago

I just cloned from source on main with the new merge, ran all three commands and did not encounter any errors. I believe the issue was due to a lingering merge conflict marker that left the old configuration intact.

mathieu-benoit commented 1 year ago

Oh ok, just to make sure, could you paste here the commands you are running? Just making sure I'm not missing anything. Thanks.

samwardbiddle commented 1 year ago

@mathieu-benoit no problem. Confirming that we just cloned from source, and followed the commands you shared, which are correct:

npm ci
npm run build
cdk synth

The outcome was:

Successfully synthesized to /Users/user/Documents/guidance-for-carbon-data-lake-on-aws/cdk.out
Supply a stack id (SharedResources, LineageStack, DataPipelineStack, DataCompactionStack, ApiStack, SageMakerNotebookStack, WebStack, TestStack) to display its template.

Is it possible that you have the old cdk.out resource still in the repo? You may need to delete cdk.out directory and synthesize again.

mathieu-benoit commented 1 year ago

Thanks for your support and help on this @samwardbiddle, deleting the cdk.out did the trick, I'm now successfully able to run cdk synth, thanks!

samwardbiddle commented 1 year ago

Great. Thank you! Thanks for your attention to detail and for submitting the PR. Really helpful. Please let us know how we can be helpful moving forward. Closing this issue.