ci: authenticate to public ECR before native build - #3
Merged
Conversation
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>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Anonymous pulls from
public.ecr.awsare 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
id-token: writeto thetestjob permissions.github-ci-public-ecr-pullvia OIDC and runsaws ecr-public get-login-password | docker login public.ecr.aws.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-pullTrust is locked to the four repos that need it:
revolut-webhook,stripe-webhook,ses-monitoring,ses-to-q.Test plan
Login Succeeded.dd-flavor matrix leg oftestcompletes without HTTP 429.