ComputeServiceContext awsEC2Context = null;
RestContext<CloudWatchClient, CloudWatchAsyncClient> cloudWatchContext = null;
try {
cloudWatchContext = ContextBuilder.newBuilder(new AWSCloudWatchProviderMetadata())
.credentials(accessKeyId, secretKey)
.build();
awsEC2Context = ContextBuilder.newBuilder(new AWSEC2ProviderMetadata())
.credentials(accessKeyId, secretKey)
.build(ComputeServiceContext.class);