How do I close an AWS S3 client connection

You don't need to close a 'connection", as there's no such thing as a continuous connection to S3 when using AmazonS3Client.

The AWS java SDK send REST requests to S3, where REST is stateless, for each REST request, it will be signed with the user credentials information, so it doesn't need a long connection(such as something like session).


In the documentation there is an optional method called 'shutdown'

Shuts down this client object, releasing any resources that might be held open. This is an optional method, and callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client has been shutdown, it should not be used to make any more requests.

For example

@Override
public boolean disconnect() {
    s3Client.shutdown()
    return false;
}