Skip to content

ci: invoke lambda on build#86

Merged
Perry2004 merged 1 commit into
mainfrom
ci/invoke-lambda-on-rebuild
Jun 24, 2026
Merged

ci: invoke lambda on build#86
Perry2004 merged 1 commit into
mainfrom
ci/invoke-lambda-on-rebuild

Conversation

@Perry2004

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 24, 2026 01:45
@Perry2004 Perry2004 merged commit 99d08d1 into main Jun 24, 2026
3 checks passed
@Perry2004 Perry2004 deleted the ci/invoke-lambda-on-rebuild branch June 24, 2026 01:46

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

Adds a post-deploy CI step to invoke an AWS Lambda function after publishing the built site to S3, intended to regenerate “rolling images” as part of the deployment workflow.

Changes:

  • Invoke a Lambda function after aws s3 sync completes.
  • Add JSON-based validation of Lambda invocation metadata and function response payload before proceeding to CloudFront invalidation.

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

Comment on lines +40 to +44
aws lambda invoke \
--function-name "${{ vars.AWS_LAMBDA_FUNCTION_NAME }}" \
--payload '{}' \
--cli-binary-format raw-in-base64-out \
lambda-response.json > lambda-invoke.json
Comment on lines +46 to +47
cat lambda-invoke.json
cat lambda-response.json
exit 1
fi

if ! jq -e '(.body | fromjson | .success) == true' lambda-response.json > /dev/null; then
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