Amazon DocumentDB (with MongoDB compatibility) now supports 1-click EC2 connectivity with Amazon Elastic Compute Cloud (Amazon EC2), providing Amazon DocumentDB customers the option to easily set up connectivity with an Amazon EC2 instance using the AWS DocumentDB Console. 1-click EC2 connectivity automatically configures your VPC and related network settings to enable a secure connection between the Amazon EC2 instance and the Amazon DocumentDB cluster within minutes.
Source:: Amazon AWS