Configure AWS Integration
- OAuth 2.0 authentication for programmatic access to Cloud Manager is available as a Preview feature.
- The feature and the corresponding documentation might change at any time during the Preview period. To use OAuth 2.0 authentication, create a service account to use in your requests to the Cloud Manager Public API.
Important
The ability to provision MongoDB servers in AWS using Cloud Manager was retired in October 2017.
Any existing clusters continue as they are.
This retirement impacts DNS entries in the following ways:
Entries for existing servers continue to resolve to the same IP address to which they currently resolve until at least January 1, 2023.
Servers that undergo a change of IP address due to maintenance or an instance stop/restart will no longer be resolvable via their
mongodbdns.com
hostname.All existing
mongodbdns.com
hostnames will stop working in May 2023.
Cloud Manager can manage hosts provisioned directly through AWS. See Provision Servers for Automation.
If you are interested in fully managed provisioning on AWS, evaluate MongoDB Atlas.
If you want to continue using Cloud Manager to manage these deployments, update the hostname for each host using one of the following methods for a replica set:
Considerations
These procedures involve stepping down the old primary and triggering
at least one election for a new primary. All writes to the primary
fail during the period starting when the
rs.stepDown()
method is received until either a
new primary is elected, or if there are no electable secondaries, the
original primary resumes normal operation. For MongoDB versions 4.0 and
earlier, all client connections are closed.
Consider performing this procedure during a maintenance window during which applications stop all write operations to the cluster.
To learn more about elections, see rs.stepDown() behavior and Replica Set Elections.
Rolling Resync onto New EC2 Instances
Replace each non-primary replica set member with a new EC2 instance.
Add a new instance to the replica set using its EC2 hostname. To learn more, see Add Members to a Replica Set.
Wait for the initial sync to complete. To learn how to get the status of an initial sync, see the MongoDB manual.
Remove one old replica set member with a
mongodbdns.com
hostname. To learn more, see Remove Members from Replica Set.
Repeat for each non-primary replica set member.
Replace the primary with a new EC2 instance.
Add the last new instance to the replica set using its EC2 hostname. To learn more, see Add Members to a Replica Set.
Wait for the initial sync to complete. To learn how to get the status of an initial sync, see the MongoDB manual.
Connect to the primary and step it down. To learn more, see
rs.stepDown()
.Note
Stepping down the primary triggers at least one election for a new primary. To learn more about elections, see Replica Set Elections.
Remove the old primary with the
mongodbdns.com
hostname from the replica set. To learn more, see Remove Members from Replica Set.
Update a Replica Set's Hostnames
Follow the Change Hostnames while Maintaining Replica Set Availability procedure in the MongoDB manual.
An overview of the linked procedure is as follows:
Reconnect to the primary and step it down.
Note
Stepping down the primary triggers at least one election for a new primary. To learn more about elections, see Replica Set Elections.