Run JavaScript and TypeScript functions
Handle requests, notifications, and scheduled tasks with small programs. WebShield runs your code and provides storage for its data.
Compatible with Workers APIs. You need your own domain to publish.
Request
Function
Response
For tasks that need a small handler
A small API
Validate request data and return a response. Suitable for forms, search, and small services.
Service notifications
Process payment events, submissions, and webhooks. Your code verifies the sender’s signature.
Scheduled tasks
Run periodic checks and data updates. Set the schedule in your function’s project.
Data alongside your code
- D1, KV, and Durable Objects
- Recovery for stored data
Run when you need it
- On an HTTP request or a schedule
- Your domain with automatic HTTPS
What it costs to run
$1.94
Minimum reservation for 30 days of continuous operation
0.1 vCPU and 192 MB of memory, running around the clock
Excludes data storage and the domain plan. This is the reservation cost, not a spending limit.
Pay for CPU and memory used by running instances, with the reservation as a minimum, plus stored data and recovery history. There is no per-call charge. Traffic follows the domain plan; invoices are issued monthly.
A sleeping function uses no billable CPU or memory, but stored data remains billable. The first request waits for the instance to wake up.
Pricing and cost estimatesThree steps to launch
Create a function
Choose Function as the service kind in your project. Prepare your JavaScript or TypeScript code.
Publish the project
Send the code using the WebShield CLI. Settings and schedules live in wrangler.jsonc.
Connect a domain and data
Add your hostname. Set up D1, KV, or Durable Objects when needed.
Before your first deployment
Am I charged for each invocation?
No. Billing covers the CPU and memory of running instances, with the reservation as a minimum, plus stored data and recovery history. Sleeping instances incur no CPU or memory charges.
Will any Workers project work unchanged?
It depends on its features. Fetch, scheduled handlers, Durable Objects, D1, KV and queues are supported. Containers and Sandbox are not. Check your bindings before migrating.
Can I run Python or a Dockerfile?
Choose Apps for that. Functions are for JavaScript and TypeScript using Workers APIs.
Do sleeping functions wake instantly?
The first request waits for startup after sleep. Keep one instance running for a fast first response; its resources are billed even without requests.
Need to run Python, Node.js, Go, or a Dockerfile project? See Apps
Start with one handler
Create a function for your API or first scheduled task. Set up data storage when you need it.