The scheduled GitHub Actions audit fails with `Error: Could not assume role with OIDC: Not authorized to perform sts:AssumeRoleWithWebIdentity`.
AdvancedTroubleshootingConcurrency, async, tests, services & containers
Answer
Likely causes → The role trust policy's sub condition does not match the token (wrong repo or branch, or the job uses an environment:, which changes sub to repo:org/repo:environment:prod), the aud is not sts.amazonaws.com, the OIDC provider is missing, or the workflow lacks permissions: id-token: write.
Diagnose → Check the trust policy conditions against the workflow; scheduled runs use the default branch, so sub is repo:org/repo:ref:refs/heads/main.
Fix → Align the token.actions.githubusercontent.com:sub condition (StringLike with the exact pattern), add id-token: write, verify the provider and audience.
Prevent → Keep the trust policy in Terraform next to the workflow; test with workflow_dispatch on main before relying on the schedule.
More on Concurrency, async, tests, services & containers
`RuntimeError: asyncio.run() cannot be called from a running event loop` in a Jupyter notebook or inside an async framework.Intermediate`RuntimeWarning: coroutine 'fetch' was never awaited` and nothing happens.BeginnerAn asyncio health-checker is no faster than a sequential loop.Advanced`Task was destroyed but it is pending!` at shutdown.Advanced`OSError: [Errno 24] Too many open files` from an asyncio scanner with 20,000 targets.IntermediateA `ThreadPoolExecutor` job finishes "successfully" but half the work is missing, with no errors logged.Intermediate