create fn
Zip a folder, ship it to Lambda, get a Function URL back.
bash
awsutopia create fn <name> --src <dir> [--runtime nodejs20.x] [--handler index.handler] [--role <arn>] [--public] [--yes] [--dry-run] [--json]deploy fn is an alias for the same thing.
What you'll get
- Lambda named
utopia-{project}-{env}-{name} - A Function URL (IAM-auth by default)
- Utopia tags so
list/destroy/logscan find it - An execution role
utopia-{project}-{env}-fn-role(unless you pass--role) - A static cost hint in the output
bash
awsutopia create fn hello --src ./fn
# you'll get something like:
# url: https://….lambda-url….on.aws/
awsutopia logs hello --since 1h
awsutopia list| Flag | Default | Notes |
|---|---|---|
--src | required | Directory to zip |
--runtime | nodejs20.x | Lambda runtime |
--handler | index.handler | Handler |
--role | auto-created | Existing execution role ARN |
--public | off | Function URL AuthType NONE — needs confirmation (or --yes) |
Re-running with the same name updates the function code (idempotent create/update).
Public URL
bash
awsutopia create fn hello --src ./fn --public --yesDecline confirmation → no-op, exit 5.
Next
Schedule it with create cron, tail with logs, tear down with destroy fn.