1 Resposta
- Mais recentes
- Mais votos
- Mais comentários
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: '****'
)
respondido há 2 anos
Conteúdo relevante
- AWS OFICIALAtualizada há 2 anos