Skip to content

revamp ephemeral instance docs #1387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 30 additions & 29 deletions content/en/user-guide/cloud-sandbox/ephemeral-instance/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ description: Create an Ephemeral Instance in the cloud using the LocalStack Web

## Introduction

LocalStack Ephemeral Instance allows you to run an LocalStack instance in the cloud.
You can interact with these remote instances via the LocalStack Web Application, or by configuring your integrations and developer tools with the endpoint URL of the remote instance.
Ephemeral Instances allows you to run a LocalStack instance in the cloud.
You can interact with these instances via the LocalStack Web Application, or by configuring your integrations and developer tools with the endpoint URL of the ephemeral instance.

{{< callout >}}
Ephemeral Instance is available on invite-only preview.
If you'd like to try it out, please [contact us](https://www.localstack.cloud/demo) to request access.
{{< callout "note" >}}
Ephemeral Instances is offered as a **preview** feature and under active development.
{{< /callout >}}

## Getting started
Expand All @@ -22,33 +21,33 @@ In this guide, we will create an Ephemeral Instance and interact with it via the

### Create a new Ephemeral Instance

Navigate to the [**LocalStack Instance Management**](https://app.localstack.cloud/instances) and click on the **Ephemeral (Team)** tab.
Click on the **Create Ephemeral Instance** button.
Navigate to the [**LocalStack Ephemeral Instance Management**](https://app.localstack.cloud/instances/ephemeral) page.
In the form, enter the name of the new Ephemeral Instance, select the lifetime of the instance by dragging the slider, and click on **Launch**.

<img src="ephemeral-instance-creation.png" alt="Creating an Ephemeral Instance" title="Creating an Ephemeral Instance" width="800" />

You will be able to specify the name of the new Epheemeral Instance.
Click on **Create Instance** to create the new Ephemeral Instance.
Optionally, you can specify a LocalStack Extension to be installed or loaded in the Ephemeral Instance.
You can select the extension from the **Extension settings** dropdown list before launching the Ephemeral Instance.
In case you have access to Cloud Pods and a pod you want to start your instance with, you can also choose it from the **Cloud Pod Settings** dropdown.

### Interact with the Ephemeral Instance

After the Epheemeral Instance is created, you will be able to see the instance in the **LocalStack Instance Management** page.
After the Ephemeral Instance is created, you will be able to see the instance in the **LocalStack Instance Management** page.

<img src="localstack-ephemeral-instance.png" alt="LocalStack Ephemeral Instance" title="LocalStack Ephemeral Instance" width="800" />

You will also be able to access the following with your Ephemeral Instance:
You will also be able to access the following features with your Ephemeral Instance:

- Status Page
- Resource Browser
- State Management
- Extensions

<img src="localstack-ephemeral-instance-resource-browser.png" alt="LocalStack Ephemeral Instance Resource Browser" title="LocalStack Ephemeral Instance Resource Browser" width="800" />
<img src="localstack-ephemeral-instance.png" alt="LocalStack Ephemeral Instance" title="LocalStack Ephemeral Instance" width="800" />

### Access the Ephemeral Instance via AWS CLI

You can access the Ephemeral Instance via the AWS CLI by configuring the AWS CLI with the endpoint URL of the Ephemeral Instance.
You can find the endpoint URL of the Ephemeral Instance in the **LocalStack Instance Management** page.
Copy the endpoint URL and set it as the `--endpoint-url` parameter in the AWS CLI command.

To create an S3 bucket in the Ephemeral Instance, run the following command:

Expand All @@ -63,25 +62,27 @@ To query the list of S3 buckets in the Ephemeral Instance, run the following com
$ aws --endpoint-url=<EPHEMERAL_INSTANCE_ENDPOINT_URL> s3 ls
{{< /command >}}

You can further use integrations, such as [CDK](https://docs.localstack.cloud/user-guide/integrations/aws-cdk/), [SAM CLI](https://docs.localstack.cloud/user-guide/integrations/aws-sam/), and [Terraform](https://docs.localstack.cloud/user-guide/integrations/terraform/), to interact with the Ephemeral Instance.
In these integrations, you can change the `LOCALSTACK_HOSTNAME` environment variable to the endpoint URL of the Ephemeral Instance.
You can also use integrations, such as [CDK](https://docs.localstack.cloud/user-guide/integrations/aws-cdk/), [SAM CLI](https://docs.localstack.cloud/user-guide/integrations/aws-sam/), and [Terraform](https://docs.localstack.cloud/user-guide/integrations/terraform/), to interact with the Ephemeral Instance.
In these integrations, you can change the `AWS_ENDPOINT_URL` environment variable to the endpoint URL of the Ephemeral Instance.

### Remove the Ephemeral Instance
### Shut Down the Ephemeral Instance

You can delete the Ephemeral Instance by clicking on the **Remove** button in the **LocalStack Instance Management** page.
These instances are automatically terminated after 90 minutes, in case you don`t remove them manually.
You can shut down the instance by navigating to the [Ephemeral Instances page](https://app.localstack.cloud/instances/ephemeral) and clicking on the **Shut Down** button.

## Load Cloud Pod into an Ephmeral Instance
<img src="shutdown-ephemeral-instance.png" alt="Shutdown the LocalStack Ephemeral Instance" title="Shutdown the LocalStack Ephemeral Instance" width="800" />

You can load a Cloud Pod into an Ephemeral Instance to seed your pre-existing cloud resources into a freshly created Ephemeral Instance.
You can further use AWS CLI or other integrations to interact with these resources, along with using other features of the LocalStack Web Application.
{{< callout "warning" >}}
Ephemeral Instances, by default, are created with the latest version of LocalStack.
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.
{{< /callout >}}

To load a pre-defined Cloud Pod, navigate to the **Cloud Pods Details** for the specific Cloud Pod and click on the **Browse Version** button.
Clicking on the button will open a modal where you will be asked to confirm that this will start a new LocalStack instance and load the selected Cloud Pod version.
## Credit Consumption

<img src="cloud-pod-details-page.png" alt="Cloud Pod Details page" title="Cloud Pod Details page" width="800" />
<br><br>
Ephemeral Instances consume credits based on the resources used and the duration of the instance.
You can view the credit consumption of the Ephemeral Instance in the **Ephemeral Instance** page.
Currently, for every 1 credit, you can run an Ephemeral Instance for 1 minute.
You can view the available minutes under the **Lifetime in minutes** slider when creating an Ephemeral Instance.
You can also see the credit consumption in the **Credit Consumption** section of the Ephemeral Instance page.

Click **Continue** to start the Ephemeral Instance and load the Cloud Pod.
You will be able to see the Ephemeral Instance on the sidebar.
You can copy the endpoint URL of the Ephemeral Instance and use it to manage your cloud resources.
<img src="credit-consumption.png" alt="Credit Consumption" title="Credit Consumption" width="800" />
<br><br>
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading