@SdkInternalApi
    final CopySnapshotResult executeCopySnapshot(CopySnapshotRequest copySnapshotRequest) {

        ExecutionContext executionContext = createExecutionContext(copySnapshotRequest);
        AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
        awsRequestMetrics.startEvent(Field.ClientExecuteTime);
        Request<CopySnapshotRequest> request = null;
        Response<CopySnapshotResult> response = null;

        try {
            awsRequestMetrics.startEvent(Field.RequestMarshallTime);
            try {
                request = new CopySnapshotRequestMarshaller().marshall(super.beforeMarshalling(copySnapshotRequest));
                // Binds the request metrics to the current request.
                request.setAWSRequestMetrics(awsRequestMetrics);
                request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
                request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
                request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());
                request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");
                request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CopySnapshot");
                request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);

            } finally {
                awsRequestMetrics.endEvent(Field.RequestMarshallTime);
            }

            StaxResponseHandler<CopySnapshotResult> responseHandler = new StaxResponseHandler<CopySnapshotResult>(new CopySnapshotResultStaxUnmarshaller());

            response = invoke(request, responseHandler, executionContext);

            return response.getAwsResponse();

        } finally {

            endClientExecution(awsRequestMetrics, request, response);
        }
    }
<p>
Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. You can copy a snapshot within the
same Region, from one Region to another, or from a Region to an Outpost. You can't copy a snapshot from an
Outpost to a Region, from one Outpost to another, or within the same Outpost.
</p>
<p>
You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs).
</p>
<p>
When copying snapshots to a Region, copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted
snapshots remain unencrypted, unless you enable encryption for the snapshot copy operation. By default, encrypted
snapshot copies use the default KMS key; however, you can specify a different KMS key. To copy an encrypted
snapshot that has been shared from another account, you must have permissions for the KMS key used to encrypt the
snapshot.
</p>
<p>
Snapshots copied to an Outpost are encrypted by default using the default encryption key for the Region, or a
different key that you specify in the request using <b>KmsKeyId</b>. Outposts do not support unencrypted
snapshots. For more information, <a
href="https://docs.aws.amazon.com/ebs/latest/userguide/snapshots-outposts.html#ami"> Amazon EBS local snapshots
on Outposts</a> in the <i>Amazon EBS User Guide</i>.
</p>
<p>
Snapshots created by copying another snapshot have an arbitrary volume ID that should not be used for any
purpose.
</p>
<p>
For more information, see <a href="https://docs.aws.amazon.com/ebs/latest/userguide/ebs-copy-snapshot.html">Copy
an Amazon EBS snapshot</a> in the <i>Amazon EBS User Guide</i>.
</p>

@param copySnapshotRequest
@return Result of the CopySnapshot operation returned by the service.
@sample AmazonEC2.CopySnapshot
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CopySnapshot" target="_top">AWS API
     Documentation</a>
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/AmazonEC2Client.java