Configure the S3 control client for S3 on Outposts by using the SDK for Java - Amazon S3 on Outposts
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Configure the S3 control client for S3 on Outposts by using the SDK for Java

The following example configures the Amazon S3 control client for Amazon S3 on Outposts by using the AWS SDK for Java. To use this example, replace each user input placeholder with your own information.

import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.services.s3control.AWSS3Control; import com.amazonaws.services.s3control.AWSS3ControlClient; public AWSS3Control createS3ControlClient() { String accessKey = AWSAccessKey; String secretKey = SecretAccessKey; BasicAWSCredentials awsCreds = new BasicAWSCredentials(accessKey, secretKey); return AWSS3ControlClient.builder().enableUseArnRegion() .withCredentials(new AWSStaticCredentialsProvider(awsCreds)) .build(); }