Skip to content

ci(deploy): CloudFront 라우팅 함수 코드 자동 동기화#1

Merged
yuchem2 merged 1 commit into
mainfrom
ci/cloudfront-function-deploy
Jun 4, 2026
Merged

ci(deploy): CloudFront 라우팅 함수 코드 자동 동기화#1
yuchem2 merged 1 commit into
mainfrom
ci/cloudfront-function-deploy

Conversation

@yuchem2

@yuchem2 yuchem2 commented Jun 4, 2026

Copy link
Copy Markdown
Member

요약

정적 export 라우팅용 CloudFront Function(convene-rewrite) 코드를 배포 파이프라인에서 자동 동기화한다. 지금까진 콘솔에 수동으로 붙여넣어 publish 해야 했다.

설계 노트

  • 런타임(cloudfront-js-1.0/2.0)을 하드코딩하면 LIVE 함수를 깰 위험이 있어, describe 로 가져온 기존 FunctionConfig 를 그대로 되돌려 코드만 교체한다.
  • behavior Associate(Viewer request 연결)는 1회성 콘솔 작업이라 자동화에서 제외.

- deploy-frontend 잡이 S3 sync 후 cloudfront-rewrite.js 를 함수에 반영한다.
- infra/cloudfront-rewrite.js 를 git 추적 대상으로 추가
@yuchem2 yuchem2 self-assigned this Jun 4, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a CloudFront Function (infra/cloudfront-rewrite.js) to handle static export routing corrections, rewriting dynamic routes to placeholder HTML files and appending index.html to directory paths. The review feedback correctly identifies compatibility issues with the cloudfront-js-1.0 runtime (ES5.1), pointing out that ES6 methods String.prototype.includes and String.prototype.endsWith are unsupported and will cause runtime errors. The reviewer provided actionable suggestions to replace these with ES5-compatible alternatives like indexOf and slice.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread infra/cloudfront-rewrite.js
Comment thread infra/cloudfront-rewrite.js
@yuchem2 yuchem2 merged commit faae752 into main Jun 4, 2026
2 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.

1 participant