개발 이야기/개발 및 서비스
AWS CPP SDK 지역 설정 방법
가온아
2020. 2. 6. 11:14
java 사용할 때는 credential 파일과 config 파일을 자신 계정 루트에 .aws 폴더 만들어서 넣으면 되는데...
cpp sdk에서는 region 정보가 담긴 config파일을 사용하지 않습니다.
https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/credentials.html
(* cpp sdk에서 credential 설정하는 방법)
Aws::SDKOptions options;
Aws::InitAPI(options);
Aws::Client::ClientConfiguration clientConfig;
clientConfig.region = "ap-northeast-2";
.
.
.
Aws::SQS::SQSClient sqs(clientConfig);
.
.
.
위의 샘플 코드처럼 clientconfiguration을 별도 설정하여 사용할 서비스 생성 시 인자로 같이 넘겨주면 됩니다.
반응형