Getting started with the Cloud Pods CLI
LocalStack provides a command line tool to manage the state of your instance via Cloud Pods.
diff --git a/academy/index.html b/academy/index.html index 816e0dff4b..148e9cc7e6 100644 --- a/academy/index.html +++ b/academy/index.html @@ -130,11 +130,11 @@
LocalStack provides a command line tool to manage the state of your instance via Cloud Pods.
3 minute read
The reference guide for LocalStack Cloud Pods CLI commands and how to get started on using them!
6 minute read
LocalStack provides a command line tool to manage the state of your instance via Cloud Pods.
3 minute read
Use Testcontainers with LocalStack
3 minute read
Use Spring Cloud Function framework with LocalStack
13 minute read
Hot code reloading continuously applies code changes to Lambda functions
10 minute read
The reference guide for LocalStack Cloud Pods CLI commands and how to get started on using them!
6 minute read
Tools to simplify application testing
2 minute read
Attach a debugger to your Lambda functions from within your IDE
8 minute read
Use LocalStack as DNS server to redirect AWS queries to LocalStack
8 minute read
Using patched SDKs in Lambdas to transparently redirect AWS API calls to LocalStack
2 minute read
Browser plugin to redirect AWS service calls to LocalStack
3 minute read
Cloud Pods provides a new way of collaborating in cloud application development workflows.
less than a minute
The LocalStack Cloud Pods Launchpad offers the easiest way of sharing and injecting cloud pods directly from your repositories or via a simple URL.
2 minute read
Using LocalStack Lambda with a self-managed Kafka cluster
2 minute read
Running LocalStack on Kubernetes
3 minute read
Get started with Amazon API Gateway on LocalStack
9 minute read
Get started with AWS Amplify on LocalStack
4 minute read
Get started with AWS Organizations on LocalStack
2 minute read
Get started with AWS DocumentDB on LocalStack
4 minute read
Get started with Amazon Elastic Compute Cloud (Amazon EC2) on LocalStack
10 minute read
Get started with Elastic Container Service (ECS) on LocalStack
2 minute read
Get started with Elastic MapReduce (EMR) on LocalStack
2 minute read
Get started with AWS ElastiCache on LocalStack
3 minute read
Get started with AWS IoT on LocalStack
4 minute read
Get started with AWS Lambdas on LocalStack
12 minute read
Get started with Quantum Ledger Database (QLDB) on LocalStack
less than a minute
Get started with Amazon Transfer on LocalStack
2 minute read
Use Testcontainers with LocalStack
3 minute read
Use Spring Cloud Function framework with LocalStack
13 minute read
Hot code reloading continuously applies code changes to Lambda functions
10 minute read
Tools to simplify application testing
2 minute read
Attach a debugger to your Lambda functions from within your IDE
8 minute read
Use LocalStack as DNS server to redirect AWS queries to LocalStack
8 minute read
Using patched SDKs in Lambdas to transparently redirect AWS API calls to LocalStack
2 minute read
Browser plugin to redirect AWS service calls to LocalStack
3 minute read
Using LocalStack Lambda with a self-managed Kafka cluster
2 minute read
Running LocalStack on Kubernetes
3 minute read
Get started with Amazon API Gateway on LocalStack
9 minute read
Get started with AWS Amplify on LocalStack
4 minute read
Get started with AWS Organizations on LocalStack
2 minute read
Get started with AWS DocumentDB on LocalStack
4 minute read
Get started with Amazon Elastic Compute Cloud (Amazon EC2) on LocalStack
10 minute read
Get started with Elastic Container Service (ECS) on LocalStack
2 minute read
Get started with Elastic MapReduce (EMR) on LocalStack
2 minute read
Get started with AWS ElastiCache on LocalStack
3 minute read
Get started with AWS IoT on LocalStack
4 minute read
Get started with AWS Lambdas on LocalStack
12 minute read
Get started with Quantum Ledger Database (QLDB) on LocalStack
less than a minute
Get started with Amazon Transfer on LocalStack
2 minute read
LocalStack provides a command line tool to manage the state of your instance via Cloud Pods.
3 minute read
The reference guide for LocalStack Cloud Pods CLI commands and how to get started on using them!
6 minute read
Cloud Pods provides a new way of collaborating in cloud application development workflows.
less than a minute
LocalStack provides a command line tool to manage the state of your instance via Cloud Pods.
3 minute read
The reference guide for LocalStack Cloud Pods CLI commands and how to get started on using them!
6 minute read
Use LocalStack as DNS server to redirect AWS queries to LocalStack
8 minute read
Using patched SDKs in Lambdas to transparently redirect AWS API calls to LocalStack
2 minute read
Cloud Pods provides a new way of collaborating in cloud application development workflows.
less than a minute
The LocalStack Cloud Pods Launchpad offers the easiest way of sharing and injecting cloud pods directly from your repositories or via a simple URL.
2 minute read
Use LocalStack as DNS server to redirect AWS queries to LocalStack
8 minute read
Using patched SDKs in Lambdas to transparently redirect AWS API calls to LocalStack
2 minute read
less than a minute
Cloud Pods are a mechanism that allows you to take a snapshot of the state in your current LocalStack instance, persist it to a storage backend, and easily share it with your team members.
While the Persistence feature ensures that the service state survives container restarts, Cloud Pods go beyond and allow more fine-grained control over your state.
Instead of simply restoring a state when restarting LocalStack, Cloud Pods allow you to take snapshots of your local instance (with the save
command) and inject such snapshots into a running instance (with the load
command) without requiring a restart.
In addition, we provide a remote storage backend that can be used to store the state of your running application and share it with your team members.
You can interact with Cloud Pods via the Web UI, and to load and store the persistent state of pods, you can use the localstack
command-line interface (CLI).
LocalStack provides a command line tool to manage the state of your instance via Cloud Pods.
Get started with LocalStack Community Cloud Pods to to save and load your container state at will
The reference guide for LocalStack Cloud Pods remotes and how to get started on using them!
The reference guide for LocalStack Cloud Pods CLI commands and how to get started on using them!
The LocalStack Cloud Pods Launchpad offers the easiest way of sharing and injecting cloud pods directly from your repositories or via a simple URL.
less than a minute
Cloud Pods are a mechanism that allows you to take a snapshot of the state in your current LocalStack instance, persist it to a storage backend, and easily share it with your team members.
The Persistence feature ensures that the service state persists across container restarts. In contrast, Cloud Pods provide more detailed control over your state.
Rather than just restoring a state during LocalStack restarts, Cloud Pods enable you to capture snapshots of your local instance using the save
command and inject these snapshots into a running instance using the load
command, all without needing to perform a full restart.
In addition, LocalStack provides a remote storage backend that can be used to store the state of your running application and share it with your team members.
You can interact with Cloud Pods via the LocalStack Web Application. To save and load the persistent state of Cloud Pods, you can use the Cloud Pods command-line interface (CLI).
Get started with Cloud Pods to manage the state of your LocalStack instance state
Reference guide for LocalStack Cloud Pods CLI commands and how to get started on using them!
The reference guide for LocalStack Cloud Pods remotes and how to get started on using them!
Get started with Cloud Pods Launchpad to share and inject Cloud Pods into your LocalStack instance via a URL
Get started with LocalStack Community Cloud Pods to to save and load your container state at will
2 minute read
The LocalStack Cloud Pods Launchpad allows you to quickly share and inject cloud pods into a LocalStack instance.
Navigate to https://app.localstack.cloud/launchpad where you can create a sharable link for your pods.
Enter a public URl to your pod in the first input field, and click on ‘Generate Link’. -The resulting link can be copied and shared with others.
You can also copy the markdown snippet to quickly add a badge to your repository.
Please consider that the launchpad takes an arbitrary URL as input and passes it onto your LocalStack instance to inject the pod. -This may lead to unintended side effects, as the URL that is passed to the launchpad is not validated in any way.
We also display the URL on the UI, so please make sure that your trust the URL when using the launchpad.
If you want to add a badge to your README that links to the Cloud Pod Launchpad, you can use the following markdown snippet:
[![Launch LocalStack Cloudpod](https://localstack.cloud/gh/launch-pod-badge.svg)](https://app.localstack.cloud/launchpad?url=url_of_your_pod)
-
Please note that you have to add the url_of_your_pod
as the url
query parameter to the URL.
-For example if you are hosting the pod in the same repository, just use the URL pointing to the raw pod file.
-Additionally, you can use the Link Generator to create the sharable link for your pod and copy the markdown for your repo.
Check out a proper example on this GitHub repository.
In this section we present an overview of common problems and how to solve them.
In case your LocalStack instance is not running, you will see the following error message:
Please start up your LocalStack instance and try again. -Find out more about how to start LocalStack in the Getting Started section.
In case the launchpad fails to load the metadata of your pod, you will see the following error message:
This can happen if the pod is not available anymore or if the URL is not valid. -Please check the URL and try again.
In case the launchpad fails to inject the pod into your LocalStack instance, you will see ‘Pod injection failed’ in the log message. -This may be due to a couple of reasons, like version mismatch. -Please check out your LocalStack logs for more information.
2 minute read
The LocalStack Cloud Pods Launchpad enables you to easily share and inject Cloud Pods into a LocalStack instance.
You can visit Cloud Pods launchpad to generate a shareable link for your pods.
Enter a public URL to your pod Cloud Pod the first input field, then click Generate Link. You can copy the resulting link and share it with others. Additionally, you have the option to copy a markdown snippet for quickly adding a badge to your repository.
The Launchpad accepts any URL as input and directly passes it to your LocalStack instance for Cloud Pod injection. As a result, this process may carry the risk of unintended side effects, as there is no validation applied to the URL provided to the launchpad.
Furthermore, it’s essential to exercise caution and only use URLs that you trust when utilizing the launchpad, as the URL is displayed in the user interface.
To add a badge to your README that links to the Cloud Pod Launchpad, you can include the following markdown snippet:
[![Launch LocalStack Cloudpod](https://localstack.cloud/gh/launch-pod-badge.svg)](https://app.localstack.cloud/launchpad?url=url_of_your_pod)
+
You need to include the url_of_your_pod
as the url
query parameter in the URL. For instance, if your Cloud Pod is hosted within the same repository, simply use the URL that directs to the raw Cloud Pod file.
Additionally, you can utilize the Link Generator to generate a sharable link for your pod and copy the corresponding markdown snippet for your repository. Check out a proper example on th Cloud Pod badge GitHub repository.
In this section we present an overview of common problems and how to solve them.
If your LocalStack instance is not running, you will encounter the following error message:
Start your LocalStack instance and attempt the operation once more. For detailed instructions on starting LocalStack, refer to the Getting Started section.
If the launchpad encounters difficulties while loading the metadata of your pod, you will receive the following error message:
This can occur when the pod is no longer accessible or if the URL provided is invalid. Review the URL and attempt the operation once more.
If the launchpad is unable to successfully inject the pod into your LocalStack instance, you will encounter a Pod injection failed
message in the log. This issue may arise from various factors, such as version disparities. For further insights and information, please review your LocalStack logs.
6 minute read
This reference provides descriptions and example commands for LocalStack Cloud Pods CLI (pod
) commands.
Use the following syntax to run localstack pod
commands from your terminal window:
$ localstack pod [OPTIONS] COMMAND [ARGS]
In the above syntax:
COMMAND
specifies the operation you want to perform with your Cloud Pods (save
or load
).OPTIONS
specifies the optional flags.ARGS
specifies the command arguments.The following section lists the available commands for the Cloud Pods CLI.
save
The save
command creates a new version of a Cloud Pod. Pro users can dump the Cloud Pod locally or upload it to the LocalStack platform. To dump the state locally, pass a local file URI as an argument to the save
command. For instance, the following command:
$ localstack pod save file://<path_to_disk>/my-pod
The above command will create a zip file named my-pod
to the specified location on the disk. To use the Cloud Pods platform, specify the Cloud Pod’s name as an argument, for example:
$ localstack pod save my-pod
The above command creates a version of my-pod
and registers it to our platform. Pushing already existing pod results in creating a new version and, eventually, uploading it to the platform. Users can also select a subset of AWS services they wish to incorporate in a new Cloud Pod version with the --services
option.
Users who want to make a Cloud Pod accessible outside their organization can mark it as public with the following command:
$ localstack pod push --name <pod_name> --visibility public
The above command does not create a new version and requires a version already registered with the platform. The CLI manual for the save
command is as follows:
Usage: python -m localstack.cli.main pod save [OPTIONS] URL_OR_NAME
-
- Save the current state of the LocalStack container in a Cloud Pod. A Cloud Pod can be exported
- locally or registered within the LocalStack Pod's platform (with a Pro license). An optional
- message can be attached to any Cloud Pod. Furthermore, one could decide to export only a subset
- of services with the optional --service option.
-
- To export on a local path run the following command:
- localstack pod save file://<path_on_disk>/<pod_name>
-
- The output will be a <pod_name> zip file in the specified directory. This Cloud Pod instance can
- be restored at any point in time with the load command.
-
- To use the LocalStack Pod's platform, the desired Pod's name only will suffice, e,g.:
-
- localstack pod save <pod_name>
-
- Please be aware that each following save invocation with the same name will result in a new
- version being created.
-
-Options:
- -m, --message TEXT Add a comment describing this Cloud Pod's version
- -s, --services TEXT Comma-delimited list of services to push in the Cloud Pod (all by default)
- --visibility TEXT Set the visibility of the Cloud Pod [`public` or `private`]. Does not
- create a new version
- --help Show this message and exit.
-
save
command.
-In particular, they can simply invoke the save
command with a file URI as an argument.load
The load
command is the inverse operation of save
. It retrieves the content of a previously stored Cloud Pod from the local file system or the Cloud Pod’s platform and injects it into the application runtime.
The load
command takes an argument that can either be a URI or a Cloud Pods name. While the first option is available to all users, the second is valid only for licensed ones.
By default, the injecting state updates the application runtime at a service level. Using the merge injection strategy, the state of all services specified in the injecting state is reflected precisely in the application runtime, while all other active services remain unchanged.
The --strategy
option can be used to change such default injection behavior. More specifically, the overwrite strategy will ensure the application runtime is an exact instance of the injecting state. The deep-merge strategy will perform a fine-grain merge of the injecting state into the application runtime.
The CLI manual for the load
command is as follows:
Usage: python -m localstack.cli.main pod load [OPTIONS] URL_OR_NAME
-
- Load a Cloud Pod into the running LocalStack container. Users can import Pods different sources:
- community users can store and retrieve Pods from local storage or any provided HTTP URL;
- licensed users can take advantage of the LocalStack Pod's platform to ease the storage,
- versioning, and retrieval of Pods.
-
- The --source option specifies a URI scheme that point to the Cloud Pod's resources to import.
-
- We support the following protocols:
- localstack pod load file://<path_to_disk>
- localstack pod load https://<some_url>
- localstack pod load git://<user>/<repo>/<local_repo_path>
-
- The latter option is merely a shortcut for --source
- https://raw.githubusercontent.com/<user>/<repo>/<branch>/<path>
-
- Importing via a provided --source is available for all users. Licensed users can omit this
- option and simply provide a name for their Cloud Pods.
+ Create project issue
4 minute read
This reference provides descriptions and example commands for LocalStack Cloud Pods CLI (pod
) commands.
Use the following syntax to run localstack pod
commands from your terminal window:
$ localstack pod [OPTIONS] COMMAND [ARGS]
In the above syntax:
COMMAND
specifies the operation you want to perform with your Cloud Pods (save
or load
).OPTIONS
specifies the optional flags.ARGS
specifies the command arguments.The following section lists the available commands for the Cloud Pods CLI.
save
The save
command allows you to save a new version of a Cloud Pod. For licensed users, it provides the option to either save the Cloud Pod locally or upload it to the LocalStack platform.
To save the state locally, simply provide a local file URI as an argument when using the save
command. Running the following command will create a file named my-pod
in the specified location on the disk:
$ localstack pod save file://<path_to_disk>/my-pod
The command mentioned above will produce a zip file named my-pod
and save it to the designated location on your disk. If you intend to utilize the Cloud Pods platform, you should specify the Cloud Pod’s name as an argument, as shown below:
$ localstack pod save my-pod
The above command generates a new version of my-pod
and uploads it on the LocalStack platform. When pushing an already existing pod, a new version is created and subsequently uploaded to the platform.
Users also have the option to select a specific subset of AWS services they want to include in the new Cloud Pod version using the --services
option.
Users who want to make a Cloud Pod accessible outside their organization can mark it as public with the following command:
$ localstack pod save --name my-pod --visibility public
The above command does not create a new version and requires a version already registered with the platform. The CLI manual for the save
command is as follows:
$ localstack pod save --help
+
+Usage: localstack pod save [OPTIONS] URL_OR_NAME [REMOTE]
Options:
- -s, --strategy TEXT Inject strategy (merge, overwrite, deep-merge).
- --help Show this message and exit.
-Note
Similar to the save
command, the usage of the Cloud Pod’s platform is restricted to licensed users. Community users can load a Cloud Pod from a local URI file, URL, or public GitHub repository. However, they have no access to Cloud Pods versioning.delete
The delete
command let users delete a Cloud Pod stored in the remote platform. The CLI manual for the delete
command is as follows:
Usage: python -m localstack.cli.main pod delete [OPTIONS]
-
- Delete a Cloud Pod register on the remove LocalStack Pod's platform. This command will cancel
- all the versions of a created Pod and won't be reversible.
+ -m, --message TEXT Add a comment describing this Cloud Pod's version
+ -s, --services TEXT Comma-delimited list of services to push in the Cloud Pod
+ (all by default)
+ --visibility [public|private] Set the visibility of the Cloud Pod [`public` or `private`].
+ Does not create a new version
+ -f, --format [json] The formatting style for the save command output.
+ -h, --help Show this message and exit.
+
load
The load
command is the inverse operation of save
. It retrieves the content of a previously stored Cloud Pod from the local file system or the LocalStack platform and injects it into the LocalStack container.
The load
command takes an argument that can either be a URI or a Cloud Pods name. By default, the injecting state updates the container state at a service level. The CLI manual for the load
command is as follows:
$ localstack pod save --help
+
+Usage: localstack pod load [OPTIONS] URL_OR_NAME [REMOTE]
Options:
- -n, --name TEXT Name of the Cloud Pod [required]
- --help Show this message and exit.
-inspect
The inspect
command simply lets the user inspect the content of a Cloud Pod. The CLI manual for the inspect
command is as follows:
Usage: python -m localstack.cli.main pod inspect [OPTIONS]
-
- Inspect the contents of a Cloud Pod
+ --merge [overwrite|merge] The merge strategy to adopt when loading the Cloud Pod [default:
+ merge]
+ -h, --help Show this message and exit.
+
delete
The delete
command let users delete a Cloud Pod stored in the remote platform. The CLI manual for the delete
command is as follows:
$ localstack pod delete --help
+
+Usage: localstack pod delete [OPTIONS] NAME
Options:
- -n, --name TEXT Name of the Cloud Pod [required]
- -f, --format TEXT Format (curses, rich, json).
- --help Show this message and exit.
-list
The list
command lists all of the available Cloud Pods. It shows all the pods available for a single user and its organization by default. If the --public option is passed to the commands, it shows only the Cloud Pods marked as public and are, therefore, available to all licensed users. The CLI manual for the
list` command is as follows:
Usage: python -m localstack.cli.main pod list [OPTIONS]
-
- List all the Cloud Pods available for a single user, or for an entire organization, if the user
- is part of one.
-
- With the --public flag, it lists the all the available public Cloud Pods. A public Cloud Pod is
- available across the boundary of a user ond/or organization. In other words, any public Cloud
- Pod can be injected by any other user holding a LocalStack Pro (or above) license.
+ -h, --help Show this message and exit.
+
inspect
The inspect
command simply lets the user inspect the content of a Cloud Pod. The CLI manual for the inspect
command is as follows:
$ localstack pod delete --help
+
+Usage: localstack pod inspect [OPTIONS] NAME
Options:
- -p, --public List all the available public Cloud Pods
- --help Show this message and exit.
-versions
The versions
command simply lists all the available versions of a Cloud Pod. The CLI manual for the version
command is as follows:
Usage: python -m localstack.cli.main pod versions [OPTIONS]
+ -f, --format [curses|rich|json]
+ The formatting style for the inspect command output.
+ [default: curses]
+ -h, --help Show this message and exit.
+
The list
command lists all of the available Cloud Pods. It shows all the pods available for a single user and its organization by default. The CLI manual for the list
command is as follows:
$ localstack pod list --help
+
+Usage: localstack pod list [OPTIONS] [REMOTE]
- List the versions available for a Cloud Pod. Each invocation of the save command is going to
- create a new version for a named Cloud Pod, is a Pod with such name already does exist in the
- LocalStack Pods platform.
+Options:
+ -p, --public List all the available public Cloud Pods
+ -f, --format [table|json] The formatting style for the list pods command output. [default:
+ table]
+ -h, --help Show this message and exit.
+
The versions
command lists all the available versions of a Cloud Pod. The CLI manual for the version
command is as follows:
$ localstack pod versions --help
+
+Usage: localstack pod versions [OPTIONS] NAME
Options:
- -n, --name TEXT Name of the Cloud Pod [required]
- --help Show this message and exit.
-
Last modified February 3, 2023: Implement Consistent formatting (#452) (ce0cc12c9)