-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Update AWSCustomResource runtime version from node.js14 to node.js16 #30373
Comments
Hey @jacido , could you please share the repro code for which particular construct, this runtime is being generated. |
Lambda_Function.py ''' Module to create a Lambda function''' from aws_cdk.custom_resources import ( from os import path def create(self, name: str, app_name: str, env_name: str, role: _iam.Role, security_groups, vpc, subnets):
def add_resource_policy(self, name: str, lambda_arn: str, user_pool_arn: str ): def setup_environment_variables(self, lane_name:str, function_name:str, function_arn: str, user_pool_id: str, client_id: str ):
cognito_custom_auth_stack.py from aws_cdk import ( import os from . import cognito class CognitoCustomAuthStack(Stack):
|
Hey @jacido, I believe we have updated our Make sure that both your |
@jacido Please review last comment #30373 (comment) and share your findings. |
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. |
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Describe the feature
Update Runtime version of AWSCustomResource from node.js14 to node.js16 or recommended runtime.
Currently using certain constructs and properties are resulting in deploying with a deprecated runtime.
Use Case
When deploying a solution using AWSCustomResource, it results in using an old deprecated runtime version.
cdk.out/ tree.json code snippet:
"Resource": {
"id": "Resource",
"path": "Cognito-lane36/AWSXXXXXXXXXXXXXXXXXXX7982bd2287/Resource",
"attributes": {
"aws:cdk:cloudformation:type": "AWS::Lambda::Function",
"aws:cdk:cloudformation:props": {
"code": {
"s3Bucket": "cdk-hnb659fds-assets-XXXXXXXX7970-us-west-2",
"s3Key": "XXXXXXXXXXXXXXXXXXXXXXXXX226d161a5cfe96f4648b21f9e4912c698bf30.zip"
},
"role": {
"Fn::GetAtt": [
"AWSXXXXXXXXXXXXXXXXXXX7982bd2287ServiceRoleC1XXXFF2",
"Arn"
]
},
"functionName": "MyCustomLmbdFn",
"handler": "index.handler",
"runtime": "nodejs14.x",
"tags": [
{
"key": "AppManagerCFNStackKey",
"value": "Cognito-lane36"
}
],
"timeout": 120
}
},
"constructInfo": {
"fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
"version": "2.72.1"
}
}
Proposed Solution
Update to latest runtime.
Other Information
Current workaround regarding the issue is using property override escape hatch.
test = self.node.find_child("AWSXXXXXXXXXXXXXXXXXXX7982bd2287").node.default_child
test.add_property_override("Runtime", "nodejs20.x")
[Link] - add_property_override
https://constructs.dev/packages/aws-cdk-lib/v/2.135.0/api/CfnHoursOfOperation?lang=python&submodule=aws_connect#addPropertyOverride
Acknowledgements
CDK version used
2.142.1
Environment details (OS name and version, etc.)
Python
The text was updated successfully, but these errors were encountered: