mongocli atlas privateendpoint <provider> create

The privateendpoint <provider> create command creates one private endpoint connection for AWS or Azure in an Atlas project. You can also create a private endpoint connections through the Atlas UI or API.

mongocli atlas privateendpoint(s)|privateEndpoint(s) aws|azure create
--region <cloud-provider-region>
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]
[ --projectId <project-ID> ]

Use -h or --help to view the command-line help for this command.


Cloud provider region in which you want to create the private endpoint connection.


Atlas supports private endpoint connections only for AWS .

See the Atlas documentation for limitations on the number of private endpoints you can create in different regions.

See the supported region values for the following providers:

--output, -o

Command output format. Valid values are:

  • json for output in JSON format
  • go-template for custom output using the Go template
  • go-template-file for custom output specified using the Go template file

If omitted, the command returns output in the default format.

--profile, -P
Name of the profile where the public and private keys for the project are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI.

Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable.


If the command succeeds, it returns the following output in the default format. If the command returns errors, see Troubleshooting for recommended solutions.

Private endpoint '<private-endpoint-id>' created.

The default output is a subset of the fields returned by this command. For the complete list of JSON fields returned by the command, see the Public API reference for your MongoDB service:

The following command creates one private endpoint connection for AWS in a project using the default profile, which contains credentials and the project ID. The output is returned in the default format.

mongocli atlas privateendpoint aws create --region us-east-1

The previous command prints the following to the terminal.

Private endpoint '5f4fc829a2b47835a58c6d04' created.
Give Feedback