public static void CreateVPCEndpoint() { AmazonEC2Client client = new AmazonEC2Client(); CreateVpcRequest vpcRequest = new CreateVpcRequest("10.32.0.0/16"); CreateVpcResponse vpcResponse = client.CreateVpc(vpcRequest); Vpc vpc = vpcResponse.Vpc; CreateVpcEndpointRequest endpointRequest = new CreateVpcEndpointRequest(); endpointRequest.VpcId = vpc.VpcId; endpointRequest.ServiceName = "com.amazonaws.us-west-2.s3"; CreateVpcEndpointResponse cVpcErsp = client.CreateVpcEndpoint(endpointRequest); VpcEndpoint vpcEndPoint = cVpcErsp.VpcEndpoint; }