Skip to content

fix: load more env var#88

Merged
Perry2004 merged 2 commits into
mainfrom
feat/load-pexels-url-from-env-var
Jun 24, 2026
Merged

fix: load more env var#88
Perry2004 merged 2 commits into
mainfrom
feat/load-pexels-url-from-env-var

Conversation

@Perry2004

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 24, 2026 03:14
@Perry2004 Perry2004 merged commit cdaf967 into main Jun 24, 2026
2 checks passed
@Perry2004 Perry2004 deleted the feat/load-pexels-url-from-env-var branch June 24, 2026 03:14

Copilot AI 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.

Pull request overview

This PR makes the Lambda handler configurable via additional environment variables, allowing the S3 object key and the CloudFront invalidation path to be overridden without code changes.

Changes:

  • Read S3_OBJECT_KEY from the environment with a default fallback.
  • Read CLOUDFRONT_INVALIDATION_PATH from the environment with a default derived from the key.
  • Use the computed invalidation path when creating the CloudFront invalidation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +40 to +43
const key = process.env.S3_OBJECT_KEY ?? "website/data/rolling-images.json";
const cloudfrontInvalidationPath =
process.env.CLOUDFRONT_INVALIDATION_PATH ??
`/${key.replace(/^website\//, "")}`;
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