Giter Site home page Giter Site logo

Comments (4)

whygoyal avatar whygoyal commented on May 30, 2024

Thank you for your feedback. We have noted this as a feature request.

from aws-secrets-manager-rotation-lambdas.

julian-alarcon avatar julian-alarcon commented on May 30, 2024

Is there any estimated time for this? It's been a while.

from aws-secrets-manager-rotation-lambdas.

julian-alarcon avatar julian-alarcon commented on May 30, 2024

I just tested the current script for the Single rotation scenario and it works for DocumentDB with MongoDB 4.0 compatibility (docdb 4.0.0)!

I am using pymongo version 3.12.3 (BTW, after a lot of testing, the pymongo version used when set the rotation using the AWS Web Console by the current AWS is 3.2), but there is an error with pymongo 4+, this is what AWS Lambda shows using that newer version:

[ERROR] TypeError: 'Collection' object is not callable. If you meant to call the 'authenticate' method on a 'Database' object it is failing because no such method exists.
Traceback (most recent call last):
  File "/var/task/lambda_function.py", line 77, in lambda_handler
    set_secret(service_client, arn, token)
  File "/var/task/lambda_function.py", line 158, in set_secret
    conn = get_connection(pending_dict)
  File "/var/task/lambda_function.py", line 304, in get_connection
    conn = connect_and_authenticate(secret_dict, port, dbname, use_ssl)
  File "/var/task/lambda_function.py", line 377, in connect_and_authenticate
    db.authenticate(secret_dict['username'], secret_dict['password'])
  File "/var/task/pymongo/collection.py", line 3164, in __call__
    "exists." % self.__name

image

From this, maybe we should change the title or open a new ticket asking for the support of pymongo 4+

from aws-secrets-manager-rotation-lambdas.

jbct avatar jbct commented on May 30, 2024

Closing this issue since DocumentDB with MongoDB 4.0 compatibility works with the 3.x recommended version of pymongo. If you have a need for pymongo 4, please open a separate issue indicating the need for this newer library.

from aws-secrets-manager-rotation-lambdas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.