aws-samples / aws-secrets-manager-rotation-lambdas

Contains Lambda functions to be used for automatic rotation of secrets stored in AWS Secrets Manager
MIT No Attribution
322 stars 279 forks source link

Error when attempting to use the rds rotate secret lambda template #143

Open mobious999 opened 1 month ago

mobious999 commented 1 month ago

When I attempted to use this code https://github.com/aws-samples/aws-secrets-manager-rotation-lambdas/blob/master/SecretsManagerRDSSQLServerRotationMultiUser/lambda_function.py

I have tried multiple ways to get the pymssql package to work (either in the lambda function code or in a lambda layer) both fail with the following error.

[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'pymssql._pymssql' Traceback (most recent call last):

I've attempted to debug the module but a simple import won't even work.

This is the third time we've had lambda functions fail our rotation and I would like to see if there's a way to adjust the lambda so that it works or provide guidance on how to build the lambda package.

simonmarty commented 2 weeks ago

Could you provide information about how you currently build the lambda package?