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

Custom Resources CloudFormation template Error #9

Open
MohamedAYACH opened this issue Nov 3, 2021 · 6 comments
Open

Custom Resources CloudFormation template Error #9

MohamedAYACH opened this issue Nov 3, 2021 · 6 comments

Comments

@MohamedAYACH
Copy link

trying to create the stack using customresource.yaml file return the following error:

Resource handler returned message: "The runtime parameter of python2.7 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (python3.9) while creating or updating functions. (Service: Lambda, Status Code: 400, Request ID: e284565a-47a7-4711-9228-1fec8795a9d6, Extended Request ID: null)" (RequestToken: c710323d-72f2-80af-f088-8014e0b10247, HandlerErrorCode: InvalidRequest)

@MohamedAYACH MohamedAYACH changed the title Custom Resources CloudFormation tempalte Error Assignees: Labels: Custom Resources CloudFormation template Error Nov 3, 2021
@MohamedAYACH
Copy link
Author

And Also this is cloudwatch:

[ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'index': invalid syntax (index.py, line 38)
Traceback (most recent call last):
File "/var/task/index.py" Line 38
print 'copy
{}
to
{}
'.format(key, dest_key)

@acantril
Copy link
Owner

acantril commented Nov 3, 2021

you are using an older version of the repo.
These have all been updated :)

@acantril
Copy link
Owner

acantril commented Nov 3, 2021

do a git pull

@MohamedAYACH
Copy link
Author

Hello,

Sorry but the error at the level of lambda function still persists:

[ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'index': invalid syntax (index.py, line 38)
Traceback (most recent call last):
File "/var/task/index.py" Line 38
print 'copy
{}
to
{}
'.format(key, dest_key)

@MohamedAYACH
Copy link
Author

CloudFormation did not receive a response from your Custom Resource. Please check your logs for requestId [fc1fe86a-b445-4c4e-9cb9-9bce578cbaf4]. If you are using the Python cfn-response module, you may need to update your Lambda function code so that CloudFormation can attach the updated version.

@yasser-alhawary
Copy link
Contributor

i created a pull request to fix it , the print function is not in python3.9 format so the function fail
#13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants