aws-secrets-manager-rotation-lambdas
aws-secrets-manager-rotation-lambdas copied to clipboard
Help with this error - Runtime.UserCodeSyntaxError: Syntax error in module 'lambda_function': invalid syntax
So did the following to prepare the depedency package pip install --target ./package pg pip install --target ./package pgdb cd package zip -r ../deployment.zip .
[ERROR] Runtime.UserCodeSyntaxError: Syntax error in module 'lambda_function': invalid syntax (init.py, line 3) Traceback (most recent call last): File "/var/task/pg/init.py" Line 3 async,
Tried with python 3.6, 3.7 & 3.8; no luck; googling does not seem to help much either...
Thank you for opening this issue - we are looking into it.
Any update on this?
+1 experiencing the same issue using python 3.9. Curious, why this lambda is relying on Python OpenGL Graphics Framework
for logging. Maybe it's a typo?
Hello,
For this PostgreSQL rotation function, the names of the python modules that are imported by the function are not the same as the python package that needs to be installed. Unfortunately, this has been a cause of confusion. We have updated our README to link to our public documentation where the correct dependencies and current supported versions are outlined for each function.
For quick reference, here is the relevant link in this case: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_available-rotation-templates.html#sar-template-postgre-singleuser
Can you publish the requirements.txt file to use and what version of python to use.
We are continuing to evaluate posting the requirements.txt file in the repositories, but for now the dependencies are posted to our documentation link listed above by @JoeJesse. Closing this ticket.