We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ํ๊ฒฝ ๋ณ์
@Getter @Configuration public class AwsSnsConfig { private final String accessKey; private final String secretKey; private final String region; public AwsSnsConfig( @Value("${spring.cloud.aws.sns.credentials.access-key}") String accessKey, @Value("${spring.cloud.aws.sns.credentials.secret-key}") String secretKey, @Value("${spring.cloud.aws.sns.region.static}") String region ) { this.accessKey = accessKey; this.secretKey = secretKey; this.region = region; } @Bean public AwsCredentials awsSnsCredentials() { return AwsBasicCredentials.create(accessKey, secretKey); } ... }
@Configuration public class AwsConfiguration { @Value("${cloud.aws.credentials.access-key}") private String awsAccessKey; @Value("${cloud.aws.credentials.secret-key}") private String awsSecretKey; @Value("${cloud.aws.region.static}") private String region; @Value("${spring.profiles.active:}") private String activeProfile; @Bean public AmazonSNSClient amazonSNSClient(Environment environment ) { if(StringUtils.equals(activeProfile , "")){ return (AmazonSNSClient) AmazonSNSClientBuilder .standard() .withRegion(region) .withCredentials(InstanceProfileCredentialsProvider.getInstance()) .build(); }else{ return (AmazonSNSClient) AmazonSNSClientBuilder .standard() .withRegion(region) .withCredentials(new AWSStaticCredentialsProvider( new BasicAWSCredentials(environment.getProperty("cloud.aws.credentials.access-key"), environment.getProperty("cloud.aws.credentials.secret-key")))) .build(); } } }
๋ฐ๋ผ์ ์ถํ ์์ ๋ฐฉ์๋๋ก ๋ณ๊ฒฝํด๋ณด๊ณ ์ ํ๋๋ฐ, ์ด๋ป๊ฒ ์๊ฐํ์๋์?
The text was updated successfully, but these errors were encountered:
๋ก์ปฌ์์ Spring Boot ์คํ VS EC2 ์ธ์คํด์ค์์ Spring boot ์คํ ์ ํ๋จ ํ ์ํฉ์ ๋ง์ถ์ด์ ํค๊ฐ ์ฃผ์ ๋ฐฉ์(ํ๊ฒฝ๋ณ์ vs InstanceProfileCredentialsProvider)์ ๋ถ๊ธฐํด์ฃผ๋๊ฑธ๋ก ์ดํดํ๋๋ฐ, ๋ง์๊น์?
๋ก์ปฌ์์ Spring Boot ์คํ
EC2 ์ธ์คํด์ค์์ Spring boot ์คํ
ํ๊ฒฝ๋ณ์
InstanceProfileCredentialsProvider
๊ตณ์ด ์ด์ ๊ฐ์๋ค๋ฉด ๊ถ๊ณ ํ๋ ๋ฐฉ์์ ๋ง์ถ์ด ์ฃผ๋๊ฒ ์ผ๋จ ์ข๋ค๋ ์๊ฐ์ ๋๋ค!
Sorry, something went wrong.
jinlee1703
asn6878
No branches or pull requests
๋ ผ์ ์ฃผ์
๋ ผ์ ๋ด์ฉ
ํ๊ฒฝ ๋ณ์
๋ฅผ ์ฃผ์ ํ์ฌ ์ธ์ฆํจ.๋ฐ๋ผ์ ์ถํ ์์ ๋ฐฉ์๋๋ก ๋ณ๊ฒฝํด๋ณด๊ณ ์ ํ๋๋ฐ, ์ด๋ป๊ฒ ์๊ฐํ์๋์?
The text was updated successfully, but these errors were encountered: