diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0ba1dd0..2b2844e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,9 +12,9 @@ on: #jar 파일 빌드할 s3 버킷, aws 리전, CodeDeploy 앱 이름, 배포그룹이름 env: AWS_REGION: ap-northeast-2 - S3_BUCKET_NAME: vom-gihub-actions-s3-bucket - CODE_DEPLOY_APPLICATION_NAME: vom-codedeploy-app - CODE_DEPLOY_DEPLOYMENT_GROUP_NAME: vom-codedeploy-deployment-group + S3_BUCKET_NAME: vom-deploy-bucket + CODE_DEPLOY_APPLICATION_NAME: vom-cicd + CODE_DEPLOY_DEPLOYMENT_GROUP_NAME: vom-deployment-group # working-directory: ./VOM_Spring # 이 코드는 제 프로젝트 경로를 맞춰주기 위해 적어주었습니다. 필요하시면 적으세요! RESOURCE_PATH: ./src/main/resources/application-dev.yml permissions: diff --git a/src/main/java/vom/spring/global/config/S3Config.java b/src/main/java/vom/spring/global/config/S3Config.java index 74d2507..6457e1b 100644 --- a/src/main/java/vom/spring/global/config/S3Config.java +++ b/src/main/java/vom/spring/global/config/S3Config.java @@ -11,34 +11,34 @@ @Configuration public class S3Config { - @Value("${cloud.aws.credentials.access-key}") - private String accessKey; - - @Value("${cloud.aws.credentials.secret-key}") - private String secretKey; - - @Value("${cloud.aws.region.static}") - private String region; - - @Bean - public AmazonS3Client amazonS3Client() { - BasicAWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey); - - return (AmazonS3Client) AmazonS3ClientBuilder - .standard() - .withRegion(region) - .withCredentials(new AWSStaticCredentialsProvider(credentials)) - .build(); - } +// @Value("${cloud.aws.credentials.access-key}") +// private String accessKey; +// +// @Value("${cloud.aws.credentials.secret-key}") +// private String secretKey; +// // @Value("${cloud.aws.region.static}") // private String region; // // @Bean // public AmazonS3Client amazonS3Client() { +// BasicAWSCredentials credentials = new BasicAWSCredentials(accessKey, secretKey); // // return (AmazonS3Client) AmazonS3ClientBuilder // .standard() // .withRegion(region) +// .withCredentials(new AWSStaticCredentialsProvider(credentials)) // .build(); // } + @Value("${cloud.aws.region.static}") + private String region; + + @Bean + public AmazonS3Client amazonS3Client() { + + return (AmazonS3Client) AmazonS3ClientBuilder + .standard() + .withRegion(region) + .build(); + } }