in s3/src/main/scala/com/gu/conf/S3ConfigurationLocation.scala [21:35]
override def load(credentials: => AwsCredentialsProvider): Config = {
logger.info(s"Attempting to load configuration from S3 for bucket = $bucket path = $path and region = $region")
val s3Client = S3Client.builder
.credentialsProvider(credentials)
.region(Region.of(region))
.build()
val content = s3Client.getObjectAsBytes(
GetObjectRequest.builder.bucket(bucket).key(path).build()
).asString(UTF_8)
s3Client.close()
ConfigFactory.parseString(content, ConfigParseOptions.defaults().setOriginDescription(s"s3://$bucket/$path"))
}