I want to use auth.AwsCredentialsProvider.new_default_chain() method in ECS task. In API doc https://awslabs.github.io/aws-crt-python/api/auth.html#awscrt.auth.AwsCredentialsProvider, found following:
Create the default provider chain used by most AWS SDKs.
Generally:
What does (conditional, off by default) mean and how to turn it on?
To enable it, you have to create an IAM Role for your ECS task, and attach it in the task definition for Amazon Elastic Container Service (Amazon ECS).
Task IAM role - Your Amazon ECS tasks can have an IAM role associated with them. The permissions granted in the IAM role are assumed by the containers running in the task. See Task IAM role
Below is the place (highlighted) where you can specify IAM Role while creating the Task Definition.