ScreenshotNeo

BlogHow-to

How to Schedule Website Screenshots in India Using an AWS Mumbai Region Server

Schedule website screenshots in Indian local time with EventBridge Scheduler, Lambda, and S3. Configure Asia/Kolkata and handle browser capture reliably.

By the ScreenshotNeo team4 October 20269 min read

Yes. Use Amazon EventBridge Scheduler in the Asia Pacific (Mumbai) Region to invoke an AWS Lambda function, have that function capture the target website, and optionally save the image to Amazon S3. Set the schedule time zone to Asia/Kolkata to run at Indian local time. Scheduler delivery and a successful browser capture are separate outcomes: verify both the invocation and the browser result.

1. Architecture and prerequisites

The workflow has three parts:

  1. EventBridge Scheduler evaluates a recurring cron or rate expression, or a one-time schedule, in the selected time zone.
  2. Lambda receives a JSON payload and runs the browser-capture code. Choose and deploy a browser runtime and compatible browser binaries for Lambda; AWS’s archived screenshot example is not a current packaging recipe.
  3. Amazon S3 stores captured image files when you need durable history or downstream access. If you only need to process a capture immediately, the function can instead send it to another destination.

AWS lists EventBridge Scheduler in Asia Pacific (Mumbai). Check regional support for every component you deploy, including Lambda and S3. The AWS screenshot sample demonstrates periodic page loading, screenshot capture, and S3 storage, but it was archived on July 14, 2025 and lists Node.js 12.x. Treat it as an architectural example, not a deployment template.

Before starting, decide the target URL, local run time and frequency, output format and object naming, and how you will package a browser that works with your chosen Lambda runtime. Give the function permission to write to the intended S3 bucket only if it needs to store output.

2. Configure EventBridge Scheduler for India time

For a daily run at 9:00 a.m. India Standard Time, use a cron expression of cron(0 9 * * ? *) and set the Scheduler time zone to Asia/Kolkata. Scheduler supports time zones for cron and one-time schedules and uses the IANA Time Zone Database. India does not observe daylight saving time, so this local run time does not shift seasonally.

Need Expression example Time-zone setting
Every day at 9:00 a.m. cron(0 9 * * ? *) Asia/Kolkata
Every weekday at 6:30 p.m. cron(30 18 ? * MON-FRI *) Asia/Kolkata
Every 15 minutes rate(15 minutes) Rate schedules represent an interval; use cron when a particular wall-clock time matters.
Run once A Scheduler one-time schedule for the intended date and time Set Asia/Kolkata for an India-local appointment.

Create the schedule with the Lambda function as its target and provide the target JSON input, such as {"url":"https://example.com","bucket":"my-screenshot-bucket","keyPrefix":"daily"}. The schedule needs an execution role that allows Scheduler to invoke the target function. The Lambda console trigger flow can create a suitable role; when using the CLI or infrastructure-as-code, configure the role explicitly. AWS documents that Scheduler invokes Lambda asynchronously, so a successful schedule delivery does not mean the page rendered or the image was saved.

Use Scheduler rather than assuming the older EventBridge scheduled-rule behavior applies. AWS’s older scheduled-rule troubleshooting guidance says to use UTC+0; that is guidance for scheduled rules. Scheduler has its own selectable time-zone setting.

3. Implement the browser capture in Lambda

The function below shows the application logic: validate the event, capture the requested URL with an installed browser adapter, and save the returned bytes to S3. capturePage is deliberately an adapter boundary: connect it to a browser package and Lambda-compatible browser binary that you have selected and deployed. The research example does not establish a current browser package, binary, runtime, or memory configuration, so those deployment-specific choices must be verified against the package and runtime documentation you use.

// handler.mjs — Node.js Lambda handler; deploy with an implementation of capturePage.
import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3";

const s3 = new S3Client({});

export async function handler(event) {
  const url = event?.url;
  const bucket = event?.bucket;
  const keyPrefix = event?.keyPrefix ?? "screenshots";
  if (!url || !bucket) {
    throw new Error("Event must include url and bucket");
  }

  const parsed = new URL(url);
  if (!["http:", "https:"].includes(parsed.protocol)) {
    throw new Error("Only http and https URLs are supported");
  }

  // Implement this with your chosen Lambda-compatible browser package.
  // It should return { bytes: Buffer, contentType: "image/png" }.
  const { bytes, contentType } = await capturePage(url, {
    fullPage: true,
    waitUntil: "networkidle",
    timeoutMs: 45000
  });

  const timestamp = new Date().toISOString().replaceAll(":", "-");
  const key = `${keyPrefix}/${timestamp}.png`;
  await s3.send(new PutObjectCommand({
    Bucket: bucket,
    Key: key,
    Body: bytes,
    ContentType: contentType
  }));

  return { bucket, key, contentType, bytes: bytes.length };
}

This is runnable handler structure once capturePage is connected to the chosen browser implementation and that browser and its dependencies are included in the deployment. Do not deploy the placeholder as-is: an undefined browser adapter cannot capture a page. Keep the S3 bucket name and key prefix in the event or environment configuration, not hard-coded into shared source. Grant the Lambda execution role only the S3 write permissions needed for the destination bucket and prefix.

For a capture that should not be archived, omit the S3 write and return or forward the capture through an appropriate destination. Lambda execution has finite time and memory; set its timeout to cover browser startup, page loading, screenshot encoding, and upload, while staying within the limits of the runtime and deployment. The exact browser setup and sizing depend on your selected package and target pages.

4. Deploy and connect the schedule

  1. Deploy the handler with a supported Node.js Lambda runtime, the AWS SDK S3 client dependency, and your selected browser implementation and browser binaries.
  2. Configure the function’s execution role for the required S3 write action on the target bucket and any other services it actually uses.
  3. Create an EventBridge Scheduler schedule in Asia Pacific (Mumbai), select the Lambda function target, set the JSON payload, and choose the expression and Asia/Kolkata time zone.
  4. Configure Scheduler’s invocation role so it can invoke that Lambda function. Avoid broad target permissions when a function-specific permission suffices.
  5. Run a manual invocation with the same payload, then inspect the Lambda result and S3 object before relying on the recurring schedule.
  6. Check CloudWatch Logs after scheduled times to confirm that Lambda ran, and check the bucket to confirm that the capture completed and was stored.

For infrastructure-as-code or CLI deployment, make the schedule, its target role, the Lambda function, its execution role, and the bucket policy or permissions explicit resources. Keep the schedule’s target input and time zone under version control so changes to the URL, cadence, or local-time intent are reviewable.

5. Choose retries, delivery windows, and failure handling

Scheduler settings help handle event delivery; they do not make browser work succeed. Select a retry policy based on whether repeating a capture is safe, and configure a dead-letter queue if you need a record of invocations that could not be delivered to the target. A flexible time window can spread invocation timing when an exact minute is not required. For time-sensitive captures, use the appropriate precise schedule configuration and account for the fact that asynchronous invocation and page rendering still take time.

Make the function safe to retry. Timestamp-based S3 keys preserve each attempt but can create multiple objects for one scheduled time; deterministic keys can overwrite an earlier result. Choose intentionally, and consider including a schedule date or run identifier in the object key. Track capture failures separately from invocation failures: a function can be invoked successfully and then fail because the browser could not load the page.

6. Verify time zone, output, and history

  • Confirm the schedule is deployed in the intended region and targets the correct function alias or function.
  • Confirm Asia/Kolkata is selected for cron or one-time schedule interpretation.
  • Inspect CloudWatch Logs for invocation time, requested URL, browser error, and upload outcome. Avoid logging secrets or sensitive page contents.
  • Confirm the expected S3 key exists, its content type matches the image encoding, and the object can be read by the intended consumer.
  • Keep enough run metadata to distinguish a missed delivery, a Lambda error, a page-load problem, and an S3 permissions or upload failure.

7. Performance, reliability, and cost considerations

Capture duration depends on browser startup, page complexity, network conditions, and the wait condition. A full-page screenshot of a long or script-heavy page can take more time and memory than a viewport capture. Use a page readiness condition that matches the site: waiting for all network activity to stop can hang or time out on pages with persistent connections, while taking the screenshot too early can miss late content.

For reliability, separate the schedule’s delivery status from the function’s capture status, make retries safe, and monitor logs and stored outputs. Browser automation introduces failure modes that a basic Lambda invocation does not detect on its own, including navigation timeouts, blocked automation, consent overlays, and dynamic content that has not rendered yet.

Estimate costs from the resources and frequency you actually deploy: Scheduler invocations, Lambda duration and memory, S3 storage and requests, and any logging or queue resources. This research does not provide current prices or performance measurements, so calculate them with AWS’s current pricing information for your region and usage. Retention rules for old screenshots can control storage growth.

8. Troubleshooting

Symptom Likely cause Fix
No Lambda invocation appears at the scheduled time Wrong region, expression, time zone, target, or Scheduler role permission. Inspect the schedule and target in the same region, verify Asia/Kolkata, and confirm the role can invoke the function. Check the schedule’s delivery and error settings.
It runs at an unexpected hour The schedule is interpreted in UTC or another time zone, or it is a legacy scheduled rule rather than Scheduler. Set the Scheduler time zone to Asia/Kolkata. Treat UTC+0 advice for older scheduled rules separately.
Lambda starts but cannot launch the browser The browser binary or native dependencies are missing or incompatible with the deployed runtime and architecture. Package a browser build compatible with the Lambda runtime and architecture, and check deployment packaging and permissions. The archived AWS sample’s Node.js 12.x requirement is not a current deployment recommendation.
Navigation times out or the image is blank The site is slow, blocks automated requests, requires interaction, or the chosen readiness condition never occurs. Log navigation and wait errors, choose a site-appropriate readiness condition and timeout, and test the URL with the same deployed browser environment.
Screenshot is missing from S3 Upload did not run, the bucket or key is wrong, or the Lambda execution role lacks write permission. Check the function logs and returned key, verify the event’s bucket and prefix, and grant the needed S3 permission to the function role.
There are duplicate objects after retry Each attempt creates a unique timestamp key. Use a deterministic run key if overwriting is acceptable, or retain unique keys and record the schedule/run identifier for deduplication.
Function is terminated before completion Timeout or memory allocation is insufficient for browser startup, rendering, or upload. Measure the workflow in the deployed environment, reduce unnecessary page work, and adjust configured limits within Lambda’s current service constraints.

9. Or skip the browser setup

ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns an image or PDF, so you can let the service handle the browser capture and keep EventBridge Scheduler and Lambda only if you need AWS-side scheduling or orchestration. For details, see the ScreenshotNeo API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', res);

Cookie banners, newsletter popups, and chat widgets are removed before the shot. Bot checks, blank pages, and failed loads are never billed, and response headers identify the page verdict and billing status. An MCP server lets AI agents use screenshot tools. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Learn about ScreenshotNeo, then sign up free for 1,000 screenshots a month with no card.

10. FAQ

Can I schedule a screenshot for a particular India-local time?

Yes. Use EventBridge Scheduler with a cron or one-time schedule and select Asia/Kolkata.

Does Mumbai mean the screenshot is captured from an Indian IP address?

No. Choosing the Mumbai AWS Region locates the AWS resources there; it does not by itself guarantee the browser’s public egress IP location. This workflow is about scheduling and running the capture in that region.

Does a successful Scheduler invocation guarantee a saved screenshot?

No. Scheduler invokes Lambda asynchronously. Check function logs and the expected output object to verify page capture and storage.

Should I use EventBridge Scheduler or a scheduled rule?

For a schedule that needs an explicitly selected local time zone, use EventBridge Scheduler. The UTC+0 guidance cited for older scheduled rules does not remove Scheduler’s time-zone support.

Do I need S3?

Only when you want durable object storage or a history of captures. Choose another output path if your workflow consumes each image immediately.