Skip to content

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 / logs can 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
FlagDefaultNotes
--srcrequiredDirectory to zip
--runtimenodejs20.xLambda runtime
--handlerindex.handlerHandler
--roleauto-createdExisting execution role ARN
--publicoffFunction 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 --yes

Decline confirmation → no-op, exit 5.

Next

Schedule it with create cron, tail with logs, tear down with destroy fn.

Working name — your AWS account, your bill.