Migrate from LocalStack
Move a LocalStack or floci setup to pogi, step by step.
pogi keeps LocalStack's health endpoint, init hooks and most of its variables, so many setups only change the image or the binary. Before you switch, check the coverage reference for each service you depend on.
1. Start pogi
docker run --rm -p 127.0.0.1:7644:7644 -p 127.0.0.1:10000-10002:10000-10002 ghcr.io/nrndev/pogi # or: brew install nrndev/tap/pogi && pogi
eval "$(pogi env)" # AWS_ENDPOINT_URL, test credentials, and the Google and Azure variables
pogi wait # returns when pogi is ready; the log line is "Ready."2. Point your SDKs and tools at pogi
Use http://localhost:7644. To keep LocalStack's port 4566, run pogi start --port 4566, or map it with docker run -p 127.0.0.1:4566:7644 ….
The health, info and init endpoints keep their /_localstack/... paths. See endpoint and health.
3. Swap the settings
- Replace LocalStack's environment variables with pogi's. pogi ignores any other LocalStack variable without a warning. See environment variables.
- Replace the wrapper tools (
awslocal,tflocal,cdklocal) and thelocalstackcommands. See the command-line tools. - Check host names if you use virtual-host style S3, API Gateway or Lambda URLs. See hostnames.
4. Move your init scripts
The same directories and stages work, so existing volume mounts keep working. See init hooks.
Two things to check:
- Scripts that call
awslocalneed it on thePATH. The pogi image does not ship it. Useawsinstead, which seesAWS_ENDPOINT_URL. - The image has Python 3 and Node.js, but not every tool the LocalStack image has.
For resources that need no script, pogi.yaml can seed buckets, queues, tables, stacks and more before Ready., and again after every reset.
5. Recreate saved state
pogi cannot load state saved by LocalStack. Recreate it with init scripts, Terraform or a pogi.yaml, then take a snapshot:
pogi snapshot save seedTo keep state between runs, see persistence and Save and load snapshots.
6. Update your CI and tests
- Run the
ghcr.io/image.nrndev/ pogi - Expose 7644, or map it to 4566.
- Wait for the log line
Ready.or for/_localstack/, as with LocalStack.health
In Go tests, pogi.Start(t) runs everything inside the test process on a random port, with no container.
7. Check the migration
- Run
pogi start,eval "$(pogi env)"andpogi wait. - Run your test suite or Terraform plan.
pogi logs -f(or the console's request inspector) shows every call and every error, including operations a service does not implement. - For anything that fails, find the service in the coverage reference. Its Not yet column lists what is not implemented.
If you come from floci
floci is another local AWS emulator.
Map floci's settings by what they do:
| floci | pogi |
|---|---|
| Enabled services | SERVICES, or services: in pogi.yaml |
| Region | POGI_REGION |
| Storage | --storage, or POGI_STORAGE |
| Credentials | identities: in pogi.yaml |
| Init scripts | The LocalStack directories in init hooks |
pogi ignores anything it does not read. Replace each floci endpoint with http://localhost:7644, and keep the Azure Storage ports.
See also
- LocalStack mapping
- Configuration
- Coming from floci