I managed to resolve this - It was caused by a difference in environment variables.
Specifically, The CI job set the AWS_ACCOUNT_ID
which I didn't have set locally. That env var was having a some interaction with a change made in botocore
1.37.0
related to DynamoDB URLs.
Setting that env var locally allowed me to reproduce the error locally. Pinning botocore
to 1.36.x
fixed the issue locally and on the CI server.