Skip to main content
  • An application created with fjall create app, so an infrastructure.ts file exists.
  • The resource you want to change is already declared (add it first with fjall add).
  • Run the command from your project root, where the fjall/ directory lives.

Modify a resource

fjall modify changes the properties of an existing resource in an application’s infrastructure.ts. It edits the source file in place through the codemod engine, the same AST-based editor that powers fjall add and fjall remove.
Pass each property to change as a --<property> <value> pair. The --name value is the PascalCase resource name, and <type> is the resource category.

Examples

Change a database instance class:
Update a compute service port:
Set several properties at once:

What Happens

  1. Resolves the infrastructure.ts path for the application you pass to --app.
  2. Parses the file with the codemod engine (no AWS calls).
  3. Locates the resource named by --name and merges your --<property> <value> pairs into its declaration.
  4. Writes the updated file and records a snapshot under .fjall/history/.
fjall modify edits local source only. It never contacts AWS. To apply the change, deploy afterwards with fjall deploy <app>.

Property syntax

Every property is a flag with a trailing value. Value-less flags are rejected:

Resource types

<type> must be one of the codemod resource categories:

Agent mode

Pass --agent to emit structured output for AI agents instead of the interactive UI. The command applies the change and returns a result describing the resource, file path, and lines changed. Combine with --budget, --fields, and --full to tune the output.

Options

Next Steps

fjall add

Add a new resource to an application’s infrastructure.

fjall list

List the resources declared in an application.

fjall deploy

Deploy the changed infrastructure to AWS.

Add resources

Learn how Fjall resources map to AWS services.