What is the problem?
I deployed a MySQL RDS instance in isolated subnets and added a lambda to rotate the database credentials using the addRotationMultiUser method. The Lambda function is provision correctly, but fails when it call the set_secret method. Connecting to the database fails with the following error:
[ERROR] ModuleNotFoundError: No module named 'asn1crypto' Traceback (most recent call last): File "/var/task/lambda_function.py", line 78, in lambda_handler
The dependency could be missing or the issue could be caused by a version update. Lock the version using a requirements.txt file when installing the dependencies.
pip install -r requirements.txt
Reproduction Steps
rds-stack.txt
What did you expect to happen?
Create the "Secrets Manager RDS MySQL Handler" Lambda and rotate the database credentials successfully without throwing errors.
What actually happened?
[ERROR] ModuleNotFoundError: No module named 'asn1crypto' Traceback (most recent call last): File "/var/task/lambda_function.py", line 78, in lambda_handler
CDK CLI Version
1.137.0
Framework Version
No response
Node.js Version
14.15.5
OS
macOS Big Sur Version 11.6.2
Language
Typescript
Language Version
3.9.7
Other information
No response
What is the problem?
I deployed a MySQL RDS instance in isolated subnets and added a lambda to rotate the database credentials using the
addRotationMultiUsermethod. The Lambda function is provision correctly, but fails when it call theset_secretmethod. Connecting to the database fails with the following error:[ERROR] ModuleNotFoundError: No module named 'asn1crypto' Traceback (most recent call last): File "/var/task/lambda_function.py", line 78, in lambda_handlerThe dependency could be missing or the issue could be caused by a version update. Lock the version using a requirements.txt file when installing the dependencies.
pip install -r requirements.txtReproduction Steps
rds-stack.txt
What did you expect to happen?
Create the "Secrets Manager RDS MySQL Handler" Lambda and rotate the database credentials successfully without throwing errors.
What actually happened?
[ERROR] ModuleNotFoundError: No module named 'asn1crypto' Traceback (most recent call last): File "/var/task/lambda_function.py", line 78, in lambda_handler
CDK CLI Version
1.137.0
Framework Version
No response
Node.js Version
14.15.5
OS
macOS Big Sur Version 11.6.2
Language
Typescript
Language Version
3.9.7
Other information
No response