Skip to content

ci: authenticate to public ECR before native build - #3

Merged
miguelaferreira merged 1 commit into
mainfrom
feat/public-ecr-login
May 1, 2026
Merged

ci: authenticate to public ECR before native build#3
miguelaferreira merged 1 commit into
mainfrom
feat/public-ecr-login

Conversation

@ff-team-core

Copy link
Copy Markdown
Contributor

Why

Anonymous pulls from public.ecr.aws are throttled to ~1 req/sec per source IP and the test job sometimes hits HTTP 429 when pulling the Datadog Lambda extension layer (and base images). Authenticated pulls raise the limit to ~10 req/sec per principal.

What

  • Adds id-token: write to the test job permissions.
  • Before the Gradle native Docker build, assumes the AWS role github-ci-public-ecr-pull via OIDC and runs aws ecr-public get-login-password | docker login public.ecr.aws.
  • All subsequent docker pull public.ecr.aws/... calls during the Gradle build then use authenticated rate limits.

The role is provisioned in functorful/infrastructure!7 (already merged + applied):
arn:aws:iam::879090019401:role/functorful/dev/github-ci-public-ecr-pull

Trust is locked to the four repos that need it: revolut-webhook, stripe-webhook, ses-monitoring, ses-to-q.

Test plan

  • CI run on this PR shows the "Configure AWS credentials (public ECR)" step succeeding.
  • "Login to public ECR" step prints Login Succeeded.
  • The dd-flavor matrix leg of test completes without HTTP 429.

Anonymous pulls from public.ecr.aws are throttled to ~1 req/sec per
source IP and the test job sometimes hits HTTP 429 when pulling base
images and the Datadog Lambda extension layer.

Assume the github-ci-public-ecr-pull role via OIDC and docker-login to
public.ecr.aws so subsequent pulls during the Gradle native Docker build
use authenticated rate limits (~10 req/sec per principal).

The role is provisioned in functorful/infrastructure
(2-development/aws-iam-oidc-github.tf).

Co-Authored-By: Dev (CTO) <team-core@functorful.com>
@miguelaferreira
miguelaferreira merged commit 9d88a05 into main May 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants