Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions scripts/Dockerfile.script
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ RUN npm run build
FROM node:22 AS runtime
WORKDIR /app

ARG AWS_S3_BUCKET_NAME

COPY --from=build /app/dist ./dist
COPY package*.json ./
RUN apt-get update && \
Expand All @@ -23,6 +21,7 @@ RUN apt-get update && \
RUN npm install aws-lambda-ric
RUN npm ci --only=production
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
ENV S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME}
Copy link

Copilot AI Nov 1, 2025

Choose a reason for hiding this comment

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

The environment variable S3_BUCKET_NAME is being set to ${AWS_S3_BUCKET_NAME}, but AWS_S3_BUCKET_NAME is no longer defined as an ARG (it was removed in this PR). This will result in S3_BUCKET_NAME being set to an empty string at build time. Either restore the ARG AWS_S3_BUCKET_NAME declaration or rely on the runtime environment to provide this variable and remove these ENV declarations.

Copilot uses AI. Check for mistakes.
RUN npx playwright install chromium --with-deps && \
npx playwright install-deps chromium

Expand Down
6 changes: 3 additions & 3 deletions scripts/src/lambda-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export async function handler(
const bucketName = process.env.S3_BUCKET_NAME;
const key = "data/rolling-images.json";

if (!bucketName || !key) {
console.error("Missing required environment variables: S3_BUCKET_NAME or S3_OBJECT_KEY");
if (!bucketName) {
console.error("Missing required environment variable: S3_BUCKET_NAME");
return {
statusCode: 500,
body: JSON.stringify({
success: false,
error: "Missing S3 configuration",
message: "S3_BUCKET_NAME and S3_OBJECT_KEY environment variables are required",
message: "S3_BUCKET_NAME environment variable is required",
image_links: imageLinks,
total_count: imageLinks.length,
}),
Expand Down