You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-19
Original file line number
Diff line number
Diff line change
@@ -4,49 +4,56 @@ Repository with code samples for the LocalStack workshop.
4
4
5
5
Note: The project can either be cloned and installed on your local machine, or you can spin up a remote development environment (Gitpod, or Github Codespaces) to access the project directly from your browser.
6
6
7
-
***Option 1:** Open project in [Github Codespaces](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=630930347)
8
-
***Option 2:** Open project in [Gitpod](https://gitpod.io/#https://github.com/localstack/localstack-workshop)
9
-
***Option 3:** Run project locally (see instructions below)
7
+
***Option 1:** Open the project in [Github Codespaces](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=630930347)
8
+
***Option 2:** Open the project in [Gitpod](https://gitpod.io/#https://github.com/localstack/localstack-workshop)
9
+
***Option 3:** Run the project locally (see instructions below)
10
10
11
11
## Prerequisites
12
12
13
13
* Docker
14
14
* Python/`pip`
15
-
* Node/`npm` (for CDK tooling)
16
15
* LocalStack Pro API key ([free trial key here](https://app.localstack.cloud))
17
16
18
-
## Installation
17
+
## Installation & Getting Started
18
+
19
+
LocalStack can be started in [different ways](https://docs.localstack.cloud/getting-started/installation/).
20
+
The easiest way (the one we recommend) is through the [LocalStack CLI](https://docs.localstack.cloud/getting-started/installation/#localstack-cli).
19
21
20
22
First, install the LocalStack command-line interface (CLI):
21
23
```
22
24
pip install localstack
23
25
```
24
-
Then we start the LocalStack container locally:
26
+
Then we can simply start the LocalStack container locally:
25
27
```
26
28
export LOCALSTACK_API_KEY=... # insert your API key here
27
29
DEBUG=1 localstack start
28
30
```
29
31
30
-
Additionally, we're also installing the following packages, to make the [`awslocal`](https://github.com/localstack/awscli-local), [`tflocal`](https://github.com/localstack/terraform-local) and [`cdklocal`](https://github.com/localstack/aws-cdk-local) commands available:
32
+
Once LocalStack is running in the Docker container, we can issue CLI commands to create and interact with AWS resources. Let's say, for instance, that we want to create a S3 bucket.
33
+
If you have the [AWS Command Line Interface](https://aws.amazon.com/cli/) installed on your machine, you can simply type:
To make things simpler, you might want to install [`awslocal`](https://github.com/localstack/awscli-local), i.e., our wrapper around the AWS CLI. This way, you don't need to set up the endpoint for every CLI command. The previous command would just be:
39
+
```
40
+
awslocal s3 mb s3://demo-bucket
41
+
```
39
42
40
-
...
43
+
You can create and browse resources in LocalStack also from the research browser.
44
+
Simply, go to our [Web App](https://app.localstack.cloud/), log in, and click on _Resources_ in the top navigation bar. You will gain access to our research browser, where each service has a console to manage its resources.
41
45
42
-
### Part 2: Infrastructure-as-Code Tools
46
+
### Hello World
43
47
44
-
...
48
+
Every programming language tutorial starts with printing a _Hello World_. Let us have the [equivalent](https://github.com/localstack/localstack-workshop/tree/update-after-aws-zurich/hello-world) in LocalStack.
45
49
46
-
### Part 3: LocalStack in CI Pipelines
50
+
##Deploy a Serverless App on LocalStack
47
51
48
-
...
52
+
It's time now to deploy a meaningful [serverless application](https://github.com/localstack/serverless-image-resizer/tree/a882f4c050dd8ec4594c35fa5002d4db31c5a834).
49
53
50
-
### Part 4: LocalStack Persistence and Cloud Pods
54
+
##Infrastructure-as-Code Tools - Cloud Pods - LocalStack in CI
51
55
52
-
...
56
+
We mostly interacted with LocalStack through the CLI so far.
57
+
However, large systems are hardly built this way.
58
+
Luckily, LocalStack supports a [wide range of integrations](https://docs.localstack.cloud/user-guide/integrations/) that will cover your favorite Infrastructure-as-Code (IaC) tool.
59
+
In the following [sample](https://github.com/giograno/serverless-api-ecs-apigateway-sample/tree/4bae4b7920da518034237bd95d6b6d0ab607a29d), we will first deploy a complex application with either Terraform or CloudFormation. Then, we will write a small unit test. Finally, we will close the loop by deploying and testing this app in CI with LocalStack.
This simple serverless app is the Hello World of LocalStack.
4
+
It will deploy an s3 static website with a simple _"Hello World"_.
5
+
6
+
For more information, visit our [docs](https://docs.localstack.cloud/tutorials/s3-static-website-terraform/).
7
+
8
+
## How to run
9
+
10
+
Simply start LocalStack with `localstack start -d` and then run the `deploy.sh` script.
11
+
12
+
**Note**: If you are executing in Github Codespaces, you can right-click on port 4566, then "Copy Local Address", and then append the suffix /testwebsite/index.html to the URL. For example, the final URL may look something like this: https://yourusername-vigilant-umbrella-q94554wwv-4566.preview.app.github.dev/testwebsite/index.html
0 commit comments