All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.infusers.core.secrets.aws.AwsS3Config Maven / Gradle / Ivy

There is a newer version: 2024.12.0008
Show newest version
package com.infusers.core.secrets.aws;

import com.amazonaws.regions.Regions;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
//import com.infusers.core.aws.core.AwsSecretsUtility;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AwsS3Config {
	
	@Value("${spring.aws.secretsmanager.region}")
	String region;

    @Bean
    public AmazonS3 amazonS3Client() {

        return AmazonS3ClientBuilder
                .standard()
                //.withCredentials(AwsSecretsUtility.getAWSStaticCredentialsProvider())
                .withRegion(Regions.fromName(region))
                .build();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy