Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The runtime parameter of nodejs12.x is no longer supported for creating or updating AWS Lambda functions #479

Closed
drankard opened this issue May 24, 2023 · 3 comments
Assignees
Labels
priority: high status: in-progress This issue has been picked and is being implemented type: bug Something isn't working

Comments

@drankard
Copy link

Describe the bug

The CloudFront stack is making us of a very old version of the cloudfront-authorization-at-edge Serverless Application (2.0.4)
It so old that no tag exists in github, the oldest release version i 2.0.16 and is from Oct 21.
It may not have been a deployment problem until now, when lambda node runtime 12.x is deprecated.

Deployment fails with message:
Resource handler returned message: "The runtime parameter of nodejs12.x is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs18.x) while creating or updating functions.

https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

https://github.com/awslabs/aws-dataall/blob/b44125801d76e53557df4400c5d63600eedb4e9d/deploy/stacks/auth_at_edge.py#L26

How to Reproduce

Deploy CloudFront stack

Expected behavior

No response

Your project

No response

Screenshots

No response

OS

Linux

Python version

CodePipeline default

AWS data.all version

main

Additional context

No response

@dlpzx
Copy link
Contributor

dlpzx commented May 24, 2023

Thanks for raising the issue @drankard, you are absolutely right, I was able to confirm the node version of the CloudFront Lambdas:
image

For some reason, it allowed me to deploy 5hours ago. Thank you again, we will look into it right away.

@dlpzx dlpzx self-assigned this May 25, 2023
@dlpzx dlpzx added type: bug Something isn't working status: in-progress This issue has been picked and is being implemented priority: high labels May 25, 2023
@dlpzx
Copy link
Contributor

dlpzx commented May 25, 2023

@drankard, I am performing some testing with the latest semantic version of the application (here). Once the testing on the following is complete I will open a PR.

  • pre-existing deployments
  • new deployments

dlpzx added a commit that referenced this issue May 25, 2023
### Feature or Bugfix
- Bugfix

### Detail
Custom resources created by the
[cloudfront-authorization-at-edge](https://github.com/aws-samples/cloudfront-authorization-at-edge/blob/master/example-serverless-app-reuse/README.md)
application used in data.all use node12 for the version of the
application previously used (2.0.4). By upgrading to the latest version
(2.1.5) the Lambda custom resources used also use node14 at runtime.

After upgrading the semantic version, I performed the following tests:

- [X] upgrade a pre-existing deployment (Lambdas node12) and check that
the runtime has been updated to node14. See screenshot below.
- [X] open userguide (where auth at edge is used) in pre-existing
deployment
- [X] execute GraphQL APIs in pre-existing deployment
- [X] execute ES APIs in pre-existing deployment


![image](https://github.com/awslabs/aws-dataall/assets/71252798/4d50a8fb-0084-48ee-adb8-d11b20dd6b4a)

- [X] deploy data.all from scratch and check that the Lambdas deployed
use node14
- [X] open userguide (where auth at edge is used) in new deployment
- [X] execute GraphQL APIs in new deployment
- [X] execute ES APIs in new deployment


![image](https://github.com/awslabs/aws-dataall/assets/71252798/341124bd-c4c7-4a94-b53b-e451306e2653)

### Relates
- #479 

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
@dlpzx
Copy link
Contributor

dlpzx commented May 25, 2023

This issue has been fixed in #480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high status: in-progress This issue has been picked and is being implemented type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants