Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 69c64d0

Browse files
authored
add docs on ephemeral instances cli (#1565)
1 parent e74bbe1 commit 69c64d0

File tree

1 file changed

+97
-0
lines changed
  • content/en/user-guide/cloud-sandbox/ephemeral-instance

1 file changed

+97
-0
lines changed

content/en/user-guide/cloud-sandbox/ephemeral-instance/index.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,103 @@ Ephemeral Instances, by default, are created with the latest version of LocalSta
8383
If you have created a Cloud Pod from an older version of LocalStack, you need to update the Cloud Pod to the latest version before loading it into an Ephemeral Instance.
8484
{{< /callout >}}
8585

86+
## Ephemeral Instances CLI
87+
88+
The Ephemeral Instances CLI is included in the [LocalStack CLI installation](https://docs.localstack.cloud/getting-started/installation/#localstack-cli), so no additional installations are needed to start using it.
89+
If you're a licensed user, setting the `LOCALSTACK_AUTH_TOKEN` as an environment variable is recommended to access all features of the Ephemeral Instances CLI.
90+
91+
Access the Ephemeral Instances CLI by running the `localstack ephemeral` command from your terminal.
92+
93+
{{< command >}}
94+
$ localstack ephemeral --help
95+
<disable-copy>
96+
Usage: localstack ephemeral [OPTIONS] COMMAND [ARGS]...
97+
98+
(Preview) Manage ephemeral LocalStack instances in the cloud.
99+
100+
This command group allows you to create, list, and delete ephemeral
101+
LocalStack instances.
102+
Ephemeral instances are temporary cloud instances that
103+
can be used for testing and development.
104+
105+
Options:
106+
-h, --help Show this message and exit.
107+
108+
Commands:
109+
create Create a new ephemeral instance
110+
delete Delete an ephemeral instance
111+
list List all ephemeral instances
112+
logs Fetch logs from an ephemeral instance
113+
</disable-copy>
114+
{{< / command >}}
115+
116+
To start an Ephemeral Instance, run the following command:
117+
118+
{{< command >}}
119+
$ localstack ephemeral create --name my-instance-123
120+
{{< / command >}}
121+
122+
The output of the command should look like this:
123+
124+
```bash
125+
{
126+
"creation_time": 1731347416,
127+
"endpoint_url": "https://ls-ji9gajoqrveou.sandbox.localstack.cloud",
128+
"expiry_time": 1731351016,
129+
"id": "ji9gajoqrveou",
130+
"image": {
131+
"image_name": "localstack/localstack-pro",
132+
"tag": "latest"
133+
},
134+
"instance_name": "my-instance-123",
135+
"labels": {
136+
"image-name": "localstack/localstack-pro",
137+
"image-tag": "latest",
138+
"instance-name": "my-instance-123",
139+
"requestor": "4e60f2cb"
140+
},
141+
"requestor": "4e60f2cb",
142+
"shape": {
143+
"memory_megabytes": 2048,
144+
"virtual_cpus": 1
145+
},
146+
"status": "running"
147+
}
148+
```
149+
150+
List your available running Ephemeral Instances with:
151+
152+
{{< command >}}
153+
$ localstack ephemeral list
154+
{{< / command >}}
155+
156+
Retrieve your Ephemeral Instance logs with:
157+
158+
{{< command >}}
159+
$ localstack ephemeral logs --name my-instance-123
160+
{{< / command >}}
161+
162+
The logs output will look like this:
163+
164+
```bash
165+
LocalStack version: 3.8.2.dev98
166+
LocalStack build date: 2024-11-11
167+
LocalStack build git hash: c624ee66
168+
169+
2024-11-11T17:50:42.373 INFO --- [ MainThread] l.p.c.b.licensingv2 : Successfully requested and activated new license 636c4b55-b09c-4a93-bef6-2f6d024f7d8a:enterprise 🔑✅
170+
2024-11-11T17:50:43.504 INFO --- [ MainThread] l.p.c.extensions.platform : loaded 0 extensions
171+
Ready.
172+
```
173+
174+
Finally, delete your Ephemeral Instance with:
175+
176+
{{< command >}}
177+
$ localstack ephemeral delete --name my-instance-123
178+
<disable-copy>
179+
Successfully deleted instance: my-instance-123 ✅
180+
</disable-copy>
181+
{{< / command >}}
182+
86183
## Credit Consumption
87184

88185
Ephemeral Instances consume credits based on the resources used and the duration of the instance.

0 commit comments

Comments
 (0)