Closed JD-Atkinson closed 11 months ago
Here is the -vv output: DyndnsStack | 4/8 | 8:04:40 PM | CREATE_IN_PROGRESS | AWS::Lambda::Function | dyndns_fn (dyndnsfnA1D8B956) DyndnsStack | 4/8 | 8:04:40 PM | CREATE_FAILED | AWS::Lambda::Function | dyndns_fn (dyndnsfnA1D8B956) Properties validation failed for resource dyndnsfnA1D8B956 with message:
DyndnsStack | 4/8 | 8:04:41 PM | ROLLBACK_IN_PROGRESS | AWS::CloudFormation::Stack | DyndnsStack The following resource(s) failed to create: [dyndnsfnA1D8B956]. Rollback requested by user.
Some other notes...
if runtime_function_name.value_asstring !="": fn = lambda.Function(self, "dyndnsfn", runtime=lambda.Runtime.PYTHON_311, architecture=lambda.Architecture.ARM_64, handler="index.lambdahandler", code=lambda.Code.from_asset("lambda"), role=fn_role, function_name=runtime_function_name.value_as_string,
environment={
"ddns_config_table":table.table_name
}
)
else:
because it complains that the runtime isn't the latest supported version if this edit is not made in dyndns/dyndns_stack.py
"[Error at /DyndnsStack/dyndns_fn/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"
Hello, currently reviewing this. Will it be possible for you to try using 3_9 on a Cloud9 workspace to see if you're able to deploy without specifying 3_11?
Also can you please let me know CDK version you're running on Linux2023 AWS?
Hello! Hope this can help.
I was trying to set this up and encountered this same issue. I was able to resolve it by running cdk deploy --parameters ddFunction="lambda_ddns"
. If this is required, it would be nice to have it in the readme.
Also, I encountered a problem with the runtime, since it looks like they are moving towards Python 3.11. I changed it in the code manually. If this is not a problem within the lambda handler, I recommend to upgrade the runtime in the repo also.
Thanks all for looking into this, I've merged a fix as per description below. Tested this in Cloud9 environment and local development machine and was able to deploy on 3.11 runtime. Please open a new issue referring to this one if you still encounter issues.
Pull request changes: Updated requirements.txt by removing version and added cdk-nag Added instructions on README.md to run pip install -r requirements.txt to ensure CDK is up to date. Modified CDK stack by removing option to name the Lambda function and updated to 3.11 runtime
I'm trying to implement this solution on a new Linux2023 AWS system. I was able to successfully complete the "cdk bootstrap" after figuring out all the permissions needed. Now on "cdk deploy" after step 3/8 the stack installation fails and reverts. I've tried changing the nvm version, adding permissions, checking roles..... what could be the problem and how to identify it?
DyndnsStack: creating CloudFormation changeset... 3:49:57 PM | CREATE_FAILED | AWS::Lambda::Function | dyndnsfnA1D8B956 Properties validation failed for resource dyndnsfnA1D8B956 with message:
/FunctionName: expected minLength: 1, actual: 0
❌ DyndnsStack failed: Error: The stack named DyndnsStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Properties validation failed for resource dyndnsfnA1D8B956 with message:
/FunctionName: expected minLength: 1, actual: 0
❌ Deployment failed: Error: The stack named DyndnsStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Properties validation failed for resource dyndnsfnA1D8B956 with message:
/FunctionName: expected minLength: 1, actual: 0
The stack named DyndnsStack failed creation, it may need to be manually deleted from the AWS console: ROLLBACK_COMPLETE: Properties validation failed for resource dyndnsfnA1D8B956 with message:
/FunctionName: expected minLength: 1, actual: 0