scoder
scoder

Reputation: 2611

Access credentials for s3 not found when using ECS with Fargate

I have one ECS service it is running zeppelin, I have configured zeppelin to access save the notebook in s3 bucket .

I have created a bucket and also made sure both bucket and ECS have same role. s3 bucket has the read and write policy enabled for this same role.

when my application runs I am getting below error

Caused By Exception in thread "main" com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain - error - when trying to load model from S3

is there a way to enable s3 access using roles/profile from ECS with fargate

Upvotes: 0

Views: 1431

Answers (1)

Mark B
Mark B

Reputation: 200960

When creating an ECS task you specify a "Task Execution Role" to give ECS the permission it needs to deploy your task, such as permission to access the ECR repository to load the image. You can also specify a "Task Role" that gives the task permission to access AWS resources. For example if the application running in your task needs to access S3 you would specify that as a "Task Role".

It sounds like you have not specified a task role for your ECS task, which is why the application cannot find any AWS credentials.

Upvotes: 1

Related Questions