AWS Emulator
StackPort now works with AWS Emulator, AWS's new local emulator, out of the box:
AWS_ENDPOINT_URL=https://127.0.0.1:9297 stackportAWS Emulator serves HTTPS with a certificate it creates on every start, and only accepts requests signed with keys it also creates on every start. StackPort reads both from ~/.aws/emulator/<port>/ and follows them when a restart rotates them. To run both with Docker, use examples/docker-compose.aws-emulator.yml.
For every emulator
- TLS settings per endpoint: a CA bundle, or verification off, in Settings.
- Errors that say what to do: an operation the emulator doesn't implement, rejected credentials, an untrusted certificate, or an emulator that isn't running each get their own message and hint.
- Dashboard statuses: Available, Not supported by this endpoint, or Unavailable with the reason, plus one banner when the whole endpoint is down.
- The emulator's name in the UI: MiniStack, Floci, LocalStack, Moto and AWS Emulator are recognised the same way.
- Lambda "Download code" works with Compose host names and self-signed certificates.
- A stopped emulator shows up in seconds, not about 40. Calls to local emulators aren't retried, and
STACKPORT_PROBE_TIMEOUTis now the connect timeout. - SQS: the long-polling wait time set in the UI now reaches the queue.
Security
- Files outside the UI: the UI file handler could serve other files from the machine (
/%2Fetc%2Fhosts). Fixed. - Cross-site requests: other websites could change resources through StackPort with "simple" requests, such as a form POST or an image URL. Those requests are now refused.
- DNS rebinding: browsers have to open StackPort through
localhost, an IP address, or a host name inSTACKPORT_ALLOWED_HOSTS. - Truncated downloads: a download cut off halfway no longer reaches the browser looking complete.
Changes in default behaviour
| Change | If it affects you |
|---|---|
stackport serve listens on 127.0.0.1. The Docker image still listens on 0.0.0.0, and the Compose examples publish on 127.0.0.1:8080
| stackport serve --host 0.0.0.0 or STACKPORT_HOST=0.0.0.0
|
| The API doesn't allow calls from other websites (CORS) | STACKPORT_CORS_ORIGINS=https://your.site
|
Browsers must use localhost or an IP address
| STACKPORT_ALLOWED_HOSTS=your.host for reverse proxies, Codespaces-style URLs, or machine names
|
AWS_ENDPOINT_URL sets the default endpoint every time StackPort starts with it, not only the first time
| Nothing to do |
Full changelog: v0.4.6...v0.4.7