René's URL Explorer Experiment


Title: feat(webapp): apply default repository policy on ECR repo creation by ThullyoCunha · Pull Request #3467 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: feat(webapp): apply default repository policy on ECR repo creation by ThullyoCunha · Pull Request #3467 · triggerdotdev/trigger.dev

X Title: feat(webapp): apply default repository policy on ECR repo creation by ThullyoCunha · Pull Request #3467 · triggerdotdev/trigger.dev

Description: Summary Self-hosters that operate the webapp's ECR account separately from the account running the EKS workers (e.g., a shared platform account that hosts the registry plus per-team accounts that host clusters) currently hit a 403 Forbidden the first time any project is deployed: Failed to pull image ".dkr.ecr..amazonaws.com//proj_…:…": unexpected status from HEAD request to .../v2/.../manifests/sha256:…: 403 Forbidden ensureEcrRepositoryExists in apps/webapp/app/v3/getDeploymentImageRef.server.ts calls CreateRepository and PutLifecyclePolicy, but never SetRepositoryPolicy — so the new repo inherits the AWS default (only the registry-owner account can read/pull). Workers in the cluster account get 403 every single deploy. The only workarounds today are running a one-off post-create script or pre-creating every repo by hand. Proposed change Add an optional env var: DEPLOY_REGISTRY_ECR_DEFAULT_REPOSITORY_POLICY (V4 mirror: V4_DEPLOY_REGISTRY_ECR_DEFAULT_REPOSITORY_POLICY) Raw IAM policy JSON. When set, the webapp calls SetRepositoryPolicy immediately after CreateRepository so every new repo carries that policy from creation. Operators control the principal/actions; we don't bake in any opinions about cross-account boundaries. Example value (for the typical self-host case — grant pull to the cluster account): { "Version": "2012-10-17", "Statement": [{ "Sid": "AllowClusterAccountPull", "Effect": "Allow", "Principal": {"AWS": "arn:aws:iam:::root"}, "Action": [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:BatchCheckLayerAvailability" ] }] } Why env var (not a chart-level field) Mirrors the shape of the sibling vars (DEPLOY_REGISTRY_ECR_TAGS, DEPLOY_REGISTRY_ECR_ASSUME_ROLE_ARN, etc.) which are already operator-supplied via webapp.extraEnvVars in self-host setups. Cloud is unaffected — the env var is optional, unset by default; existing behavior unchanged. Existing repos are unaffected — only newly-created repos get the policy. RepositoryCreationTemplate from the AWS provider isn't an alternative here: it only applies to repos created via pull-through-cache or replication, not to ecr:CreateRepository API calls. Implementation apps/webapp/app/env.server.ts — declare DEPLOY_REGISTRY_ECR_DEFAULT_REPOSITORY_POLICY and the V4 fallback. apps/webapp/app/v3/registryConfig.server.ts — propagate ecrDefaultRepositoryPolicy to RegistryConfig. apps/webapp/app/v3/getDeploymentImageRef.server.ts — createEcrRepository accepts the policy; if set, calls SetRepositoryPolicy after PutLifecyclePolicy. docs/self-hosting/env/webapp.mdx — documentation row added under Deploy & Registry. Verification Verified end-to-end against a self-hosted Trigger.dev on EKS where the ECR account is separate from the cluster account: Without the env var (current main): the new project's first run pod stays in ImagePullBackOff with 403 Forbidden. With the env var set to a JSON granting ecr:BatchGetImage/GetDownloadUrlForLayer/BatchCheckLayerAvailability to the cluster account: a fresh trigger.dev deploy --env prod followed by a hello-world run completes in ~5s end-to-end on the first try. Manually also confirmed that existing repos are untouched (the call only fires inside createEcrRepository, which only runs when DescribeRepositories returned RepositoryNotFoundException). Out of scope Chart values surface for this — operators already pass the existing ECR vars via webapp.extraEnvVars, so this follows the same pattern. Happy to add a first-class chart field in a follow-up if that's the preferred direction. IAM-policy validation in the webapp — we forward the JSON verbatim to AWS and surface AWS's error messages on misuse, matching how DEPLOY_REGISTRY_ECR_TAGS is handled today. This is a draft pending CI / CodeRabbit pass — happy to iterate on direction (e.g., split into per-action env vars, or extend the chart values schema) if any of the above choices feels off.

Open Graph Description: Summary Self-hosters that operate the webapp's ECR account separately from the account running the EKS workers (e.g., a shared platform account that hosts the registry plus per-team accounts th...

X Description: Summary Self-hosters that operate the webapp's ECR account separately from the account running the EKS workers (e.g., a shared platform account that hosts the registry plus per-team account...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/3467

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:0da085eb-57ec-50d8-cb5f-cfc94a661963
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD300:37FDA8:2E6F0D1:4285992:6AFAF285
html-safe-nonce7994d4498c7dad3dc49b8feb1f9e91fab5bf02a245acc30129110724d9f3d858
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMzAwOjM3RkRBODoyRTZGMEQxOjQyODU5OTI6NkFGQUYyODUiLCJ2aXNpdG9yX2lkIjoiMzMxNzQ2NTU1MDQ4MDQwNTEyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacc40cc6915269e30e410c4e769cfd1778bf4d7f425065843bc47c9c631873e179
hovercard-subject-tagpull_request:3598577372
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/3467/files
twitter:imagehttps://avatars.githubusercontent.com/u/22487526?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/22487526?s=400&v=4
og:image:altSummary Self-hosters that operate the webapp's ECR account separately from the account running the EKS workers (e.g., a shared platform account that hosts the registry plus per-team accounts th...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea85e96a83bed7871993e6b1ffda24105928eee17
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/3467/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F3467%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F3467%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3467/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3467/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/3467/files
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
nicktrnhttps://github.com/nicktrn
triggerdotdev:mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
ThullyoCunha:fix/ecr-default-repository-policyhttps://github.com/ThullyoCunha/trigger.dev/tree/fix/ecr-default-repository-policy
Conversation 8 https://github.com/triggerdotdev/trigger.dev/pull/3467
Commits 3 https://github.com/triggerdotdev/trigger.dev/pull/3467/commits
Checks 42 https://github.com/triggerdotdev/trigger.dev/pull/3467/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/3467/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3467/files
feat(webapp): apply default repository policy on ECR repo creation https://github.com/triggerdotdev/trigger.dev/pull/3467/files#top
Show all changes 3 commits https://github.com/triggerdotdev/trigger.dev/pull/3467/files
2492a30 feat(webapp): apply default repository policy on ECR repo creation ThullyoCunha Apr 28, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3467/commits/2492a30ea38d8dce384a3f30d4f74b9d74ac6458
18f7bef fix(webapp): reconcile ECR default policy on existing repos ThullyoCunha Apr 29, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3467/commits/18f7bef92fc2bc572f07e7fe4f6d59af1f9f7b22
2299221 chore: add server changes file nicktrn Apr 29, 2026 https://github.com/triggerdotdev/trigger.dev/pull/3467/commits/229922194c89d0324ab5f50e68ab89b6b28576f6
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/3467/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3467/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3467/files
ecr-default-repository-policy.md https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-cd345ceeec61d04baa3b1204390c68a3da8fb493d56384fa0104be164b2752c4
env.server.ts https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-f8823615ef72da3494e74de9e62b2fa31315ed9360f17bc06ab943f4dc25f4fd
getDeploymentImageRef.server.ts https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
registryConfig.server.ts https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-05787336b67c86a977439906482a988978e5756ffd9775bad0492df6a1bba382
webapp.mdx https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-f8dd5e39afbaf8985d144672a9af1d24bf9f4b7fe14c1d3156b500cee6da2421
.server-changes/ecr-default-repository-policy.mdhttps://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-cd345ceeec61d04baa3b1204390c68a3da8fb493d56384fa0104be164b2752c4
View file https://github.com/ThullyoCunha/trigger.dev/blob/229922194c89d0324ab5f50e68ab89b6b28576f6/.server-changes/ecr-default-repository-policy.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3467/{{ revealButtonHref }}
apps/webapp/app/env.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-f8823615ef72da3494e74de9e62b2fa31315ed9360f17bc06ab943f4dc25f4fd
View file https://github.com/ThullyoCunha/trigger.dev/blob/229922194c89d0324ab5f50e68ab89b6b28576f6/apps/webapp/app/env.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3467/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-f8823615ef72da3494e74de9e62b2fa31315ed9360f17bc06ab943f4dc25f4fd
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-f8823615ef72da3494e74de9e62b2fa31315ed9360f17bc06ab943f4dc25f4fd
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-f8823615ef72da3494e74de9e62b2fa31315ed9360f17bc06ab943f4dc25f4fd
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-f8823615ef72da3494e74de9e62b2fa31315ed9360f17bc06ab943f4dc25f4fd
apps/webapp/app/v3/getDeploymentImageRef.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
View file https://github.com/ThullyoCunha/trigger.dev/blob/229922194c89d0324ab5f50e68ab89b6b28576f6/apps/webapp/app/v3/getDeploymentImageRef.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3467/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3467/files
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-de815aca8aeac774bd9fd02ca8897b7e1ab1977bb45598a6d95369b91dcddc35
apps/webapp/app/v3/registryConfig.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-05787336b67c86a977439906482a988978e5756ffd9775bad0492df6a1bba382
View file https://github.com/ThullyoCunha/trigger.dev/blob/229922194c89d0324ab5f50e68ab89b6b28576f6/apps/webapp/app/v3/registryConfig.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3467/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-05787336b67c86a977439906482a988978e5756ffd9775bad0492df6a1bba382
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-05787336b67c86a977439906482a988978e5756ffd9775bad0492df6a1bba382
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-05787336b67c86a977439906482a988978e5756ffd9775bad0492df6a1bba382
docs/self-hosting/env/webapp.mdxhttps://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-f8dd5e39afbaf8985d144672a9af1d24bf9f4b7fe14c1d3156b500cee6da2421
View file https://github.com/ThullyoCunha/trigger.dev/blob/229922194c89d0324ab5f50e68ab89b6b28576f6/docs/self-hosting/env/webapp.mdx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/3467/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-f8dd5e39afbaf8985d144672a9af1d24bf9f4b7fe14c1d3156b500cee6da2421
https://github.com/triggerdotdev/trigger.dev/pull/3467/files#diff-f8dd5e39afbaf8985d144672a9af1d24bf9f4b7fe14c1d3156b500cee6da2421
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/3467/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.