Reputation: 3975
Currently, the way to write the source differs depending on the execution environment and I want to fix it to a unified writing style.
The code is as follows depending on the environment.
When connecting to s3 with ECS:
client = Aws::S3::Client.new(region: Settings.aws.region, credentials: Aws::ECSCredentials.new)
When connecting to s3 with not ECS:
client = Aws::S3::Client.new(region: Settings.aws.region)
When connecting to AWS s3 on ECS, an error occurs if there are no credentials.
Let me know If there is a way to improve.
Upvotes: 1
Views: 213