What gets deployed
laranja maps each thing it finds in your code to a small, predictable set of
resources — all in your own account. The mapping depends on your
provider:
| What you write | AWS | Azure |
|---|---|---|
http() app | Proxy Lambda + Function URL | HTTP-triggered function in a Function App |
@Cron / cron() | Lambda + EventBridge rule | Timer-triggered function |
@Queue / queue() | SQS queue + consumer Lambda | Storage Queue + queue-triggered function |
workers() root | One consolidated worker Lambda | Its own Function App |
| Logs | CloudWatch log group per function | Application Insights + Log Analytics |
The rest of this page details AWS. For the Azure resource list — a single Function App per workload, its storage account, and its monitoring stack — see Deploying to Azure → What gets deployed.
HTTP app → one function behind a public URL
Your entire app is deployed as one Lambda function fronted by a Lambda Function URL. There is no API Gateway.
- All routes are served by this single proxy Lambda.
- The Function URL is public (
authType: NONE); cross-origin access is off unless you opt in withcors, and your app handles auth as it sees fit. - Memory and timeout come from
computein your config, overridable per-resource under thehttpkey inresources. - The public HTTPS URL is emitted as the
HttpUrlstack output.
GET https://‹id›.lambda-url.‹region›.on.aws/
@Cron → a scheduled function
Each cron handler becomes its own Lambda plus an EventBridge rule that invokes it on schedule.
- Memory and timeout come from
compute, overridable per cron id inresources. - The schedule comes from your
rate()/every()builder or raw expression.
@Queue → a queue + a consumer function
Each queue handler becomes an SQS queue and a consumer Lambda wired to it.
- Encryption: SQS-managed (SSE-SQS).
- FIFO queues are created when the name ends in
.fifoorfifo: trueis set (content-based deduplication is enabled for FIFO). FIFO is AWS-only. - Default batch size: 10. Your handler is invoked per message with the JSON-parsed body.
- Partial-batch failures are enabled: throwing for one message fails only that message; the rest of the batch still succeeds.
- Consumer memory/timeout come from
compute. The queue's visibility timeout is derived to satisfy AWS's rule that it be ≥ the consumer timeout, and can be set explicitly per queue viaresources. - The queue URL is emitted as a stack output.
Naming
Everything is named deterministically — no random suffixes:
| Resource | Pattern | Example |
|---|---|---|
| CloudFormation stack | ‹name›-‹stage› | my-api-prod |
| Lambda functions | ‹name›-‹fn›-‹stage› | my-api-app-prod, my-api-sendEmail-prod |
‹fn› is the handler's name (the method/function name), or the explicit id you
set on @Cron/@Queue. The HTTP proxy uses app. Names are truncated to AWS's
64-character limit and sanitized to allowed characters. Azure follows the same
‹name›-‹fn›-‹stage› shape within its own naming rules.
Because the stage is part of the names, multiple stages can live in one account without colliding — see Stages & environments.
Supporting resources
Each Lambda gets an IAM execution role (and the queue consumers get the permissions to read their queue / EventBridge to invoke crons). The first deploy to an account/region also creates the one-time CDK bootstrap resources (an S3 asset bucket and roles).
laranja