Amazon DocumentDB (with MongoDB compatibility) now supports an in-place major version upgrade (MVU) from Amazon DocumentDB versions 3.6 and 4.0 to version 5.0. Instead of backing up and restoring the database to the new version or relying on database migration tools, you can perform an in-place major version upgrade with a few clicks using the AWS console, the latest AWS Software Development Kit (SDK), or Command Line Interface (CLI). With in-place MVU, no new clusters are created in the process and you can continue using the existing cluster endpoints for your applications.
Source:: Amazon AWS