From 67eb76c1242386d1379d4581e7f8b62bcf93501b Mon Sep 17 00:00:00 2001 From: minjoon-98 <4kmj54321@gmail.com> Date: Tue, 9 Jul 2024 20:36:34 +0900 Subject: [PATCH] feat : AWS S3 upload --- src/main/java/ongjong/namanmoo/service/AwsS3Service.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/ongjong/namanmoo/service/AwsS3Service.java b/src/main/java/ongjong/namanmoo/service/AwsS3Service.java index 4ad31e7..a7de7ed 100644 --- a/src/main/java/ongjong/namanmoo/service/AwsS3Service.java +++ b/src/main/java/ongjong/namanmoo/service/AwsS3Service.java @@ -30,10 +30,12 @@ public class AwsS3Service { private final String bucket; public AwsS3Service( - @Value("${aws.accessKeyId}") String accessKeyId, - @Value("${aws.secretKey}") String secretKey, + + @Value("${cloud.aws.credentials.access-key}") String accessKeyId, + @Value("${cloud.aws.credentials.secret-key}") String secretKey, @Value("${cloud.aws.s3.bucket}") String bucket, - @Value("${aws.region}") String region) { + @Value("${cloud.aws.region.static}") String region) { + BasicAWSCredentials awsCreds = new BasicAWSCredentials(accessKeyId, secretKey); this.amazonS3Client = AmazonS3ClientBuilder.standard() .withRegion(region)