I’m using the ECSRun as my run_config for my ECS f...
# ask-community
h
I’m using the ECSRun as my run_config for my ECS flows, and am switching over from making my agent a lone ec2 instance to an ecs service to ensure it stays alive. Now, when I try to start a new flow run, I’m running into a credentials error. Any idea of where the error might be coming from? I changed nothing in my flow.
k
Hey @Hugo Kitano, I think this says the agent, or where the Flow is running does not have credentials to pull from the S3 bucket where the flow is stored. I think you may have had it configured as an environment in your ec2 instance, but then didn’t put it in the ECS service. You can probably add the credentials to the service when you start it?
m
Adding
task_role_arn
like so
flow.run_config = ECSRun(task_role_arn="arn:aws:iam::[redacted]:role/AmazonECSTaskS3BucketPolicy")
worked for me. Role should be configured per this document
👍 2
Adding credentials with
env
also works
flow.run_config = ECSRun(env={'AWS_ACCESS_KEY_ID': '[redacted]', 'AWS_SECRET_ACCESS_KEY': '[redacted]'})
h
thanks, @Kevin Kho is correct. Appreciate it!