1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Aws.config is a vanilla Ruby hash. To clear the Aws.config created in the preceding steps within your code, you can use the following method:
Aws.config.clear
This will clear out all the global configuration. In the SQS client that follows you can directly configure the credentials and the region.
Reference sample:
require "aws-sdk"
# S3 specific credentials and parameter configuration
Aws.config.update(
access_key_id: '**************',
secret_access_key: '**************',,
region: '******',
force_path_style: ****
)
s3 = Aws::S3::Client.new()
# S3 specific operations
...
...
# Clear the Aws.config hash
Aws.config.clear
# new SQS client
client = Aws::SQS::Client.new(
credentials: Aws::Credentials.new(
'**************',
'**************',
),
region: '****'
)
답변함 2년 전
관련 콘텐츠
- AWS 공식업데이트됨 일 년 전