1 Respuesta
- Más nuevo
- Más votos
- Más comentarios
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 hace 2 años
Contenido relevante
- OFICIAL DE AWSActualizada hace 3 años
- OFICIAL DE AWSActualizada hace 3 años
- OFICIAL DE AWSActualizada hace 3 años