Ben
08/18/2025, 1:36 PMFlow run could not be submitted to infrastructure:
ProfileNotFound('The config profile (prefect) could not be found')
No matter what I do to ensure the AWS credentials, I am always getting this error.Ben
08/18/2025, 1:37 PMFile "/usr/local/lib/python3.12/site-packages/botocore/session.py", line 424, in get_scoped_config
raise ProfileNotFound(profile=profile_name)
botocore.exceptions.ProfileNotFound: The config profile (prefect) could not be foundBrendan Dalpe
08/18/2025, 1:41 PMAWS_DEFAULT_PROFILE or AWS_PROFILE set in your environment variables somewhere?Brendan Dalpe
08/18/2025, 1:41 PMbotocore to look for a profile called prefect in your ~/.aws/config fileBen
08/18/2025, 1:48 PMBrendan Dalpe
08/18/2025, 1:49 PMBen
08/18/2025, 1:50 PMBen
08/18/2025, 1:54 PMAWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment vars.
Using image prefecthq/prefect:3-latest and start up command:
"command": [
"/bin/sh",
"-c",
"pip install prefect-aws && prefect worker start --pool aws-ecs-work-pool --type ecs"
],Ben
08/18/2025, 1:56 PMBrendan Dalpe
08/18/2025, 2:43 PMBen
08/18/2025, 2:44 PMBrendan Dalpe
08/18/2025, 2:46 PMAWS_REGION=<whatever your region is> and AWS_DEFAULT_REGION and see if that helps?Ben
08/18/2025, 2:48 PMAWS_DEFAULT_REGION set already (forget to mention that)Ben
08/18/2025, 2:51 PMBen
08/18/2025, 2:52 PMprefect , where is it getting that?Brendan Dalpe
08/18/2025, 2:53 PMprefect profile thing which also has me scratching my head.Brendan Dalpe
08/18/2025, 2:53 PMBrendan Dalpe
08/18/2025, 2:53 PMBen
08/18/2025, 2:54 PMBen
08/18/2025, 2:55 PMBrendan Dalpe
08/18/2025, 3:41 PMAccessDeniedException('An error occurred (AccessDeniedException) when calling the RegisterTaskDefinition operation: User: arn:aws:sts::xxxx:assumed-role/xxxxxxx is not authorized to perform: ecs:RegisterTaskDefinition on resource: arn:aws:ecs:us-east-2:xxxx:task-definition/prefect_my-ecs-pool_73c9ffab-a5f9-4aa6-aef8-ea736f8c16bf:* because no identity-based policy allows the ecs:RegisterTaskDefinition action')
I'll get the relevant permissions/steps added to the docs.Brendan Dalpe
08/18/2025, 3:41 PMBrendan Dalpe
08/18/2025, 3:43 PMBen
08/18/2025, 3:44 PMBrendan Dalpe
08/18/2025, 3:45 PMBrendan Dalpe
08/18/2025, 3:45 PMBen
08/18/2025, 3:45 PMBen
08/18/2025, 3:47 PMBrendan Dalpe
08/18/2025, 3:47 PMBrendan Dalpe
08/18/2025, 3:48 PMBrendan Dalpe
08/18/2025, 5:12 PMBen
08/19/2025, 7:31 AMprefect