diff --git a/src/content/docs/aws/capabilities/config/internal-endpoints.md b/src/content/docs/aws/capabilities/config/internal-endpoints.md index 7d13eaf5..9ad73a3f 100644 --- a/src/content/docs/aws/capabilities/config/internal-endpoints.md +++ b/src/content/docs/aws/capabilities/config/internal-endpoints.md @@ -8,7 +8,7 @@ LocalStack provides several internal endpoints for various local AWS services an These endpoints are not part of the official AWS API and are available in the `/_localstack` and `/_aws` paths. You can use [curl](https://curl.se/) or your favourite HTTP REST client to access endpoints. -You can start your LocalStack instance and go to [http://localhost.localstack.cloud:4566/_localstack/swagger](http://localhost.localstack.cloud:4566/_localstack/swagger) +You can start your LocalStack instance and go to [http://localhost.localstack.cloud:4566/\_localstack/swagger](http://localhost.localstack.cloud:4566/_localstack/swagger) to browse the Swagger UI, visualize and interact with all the API's resources implemented in LocalStack. ### LocalStack endpoints @@ -24,9 +24,10 @@ You can use the `/_localstack/health` endpoint to restart or kill the services. You can use [curl](https://curl.se/) or your HTTP REST client to access the endpoint: ```bash -curl -v --request POST --header "Content-Type: application/json" --data '{"action":"restart"}' http://localhost:4566/_localstack/health -curl -v --request POST --header "Content-Type: application/json" --data '{"action":"kill"}' http://localhost:4566/_localstack/health +curl -v --request POST --header "Content-Type: application/json" --data '{"action":"restart"}' http://localhost.localstack.cloud:4566/_localstack/health +curl -v --request POST --header "Content-Type: application/json" --data '{"action":"kill"}' http://localhost.localstack.cloud:4566/_localstack/health ``` + ::: ### AWS endpoints diff --git a/src/content/docs/aws/capabilities/networking/internal-endpoints.md b/src/content/docs/aws/capabilities/networking/internal-endpoints.md index 4484d8b2..93ceb004 100644 --- a/src/content/docs/aws/capabilities/networking/internal-endpoints.md +++ b/src/content/docs/aws/capabilities/networking/internal-endpoints.md @@ -3,14 +3,14 @@ title: Internal Endpoints description: Overview of LocalStack and AWS specific internal endpoints for local development and testing template: doc sidebar: - order: 2 + order: 2 --- LocalStack provides several internal endpoints for various local AWS services and LocalStack-specific features. These endpoints are not part of the official AWS API and are available in the `/_localstack` and `/_aws` paths. You can use [curl](https://curl.se/) or your favourite HTTP REST client to access endpoints. -You can start your LocalStack instance and go to [http://localhost.localstack.cloud:4566/_localstack/swagger](http://localhost.localstack.cloud:4566/_localstack/swagger) +You can start your LocalStack instance and go to [http://localhost.localstack.cloud:4566/\_localstack/swagger](http://localhost.localstack.cloud:4566/_localstack/swagger) to browse the Swagger UI, visualize and interact with all the API's resources implemented in LocalStack. ### LocalStack endpoints @@ -26,9 +26,10 @@ You can use the `/_localstack/health` endpoint to restart or kill the services. You can use [curl](https://curl.se/) or your HTTP REST client to access the endpoint: ```bash -curl -v --request POST --header "Content-Type: application/json" --data '{"action":"restart"}' http://localhost:4566/_localstack/health -curl -v --request POST --header "Content-Type: application/json" --data '{"action":"kill"}' http://localhost:4566/_localstack/health +curl -v --request POST --header "Content-Type: application/json" --data '{"action":"restart"}' http://localhost.localstack.cloud:4566/_localstack/health +curl -v --request POST --header "Content-Type: application/json" --data '{"action":"kill"}' http://localhost.localstack.cloud:4566/_localstack/health ``` + ::: ### AWS endpoints diff --git a/src/content/docs/aws/getting-started/faq.mdx b/src/content/docs/aws/getting-started/faq.mdx index 37d443f1..0a511f77 100644 --- a/src/content/docs/aws/getting-started/faq.mdx +++ b/src/content/docs/aws/getting-started/faq.mdx @@ -11,25 +11,27 @@ import { Tabs, TabItem } from '@astrojs/starlight/components'; ## LocalStack Core FAQs ### How do I resolve SSL issues due to revoked local certificate for `localhost.localstack.cloud`? + To resolve the issue follow the steps: + 1. **Update to the latest LocalStack version:** To resolve the SSL issues due to revoked certificate, we strongly recommend updating to the latest LocalStack version (v3.7.0 and above)for the most reliable and seamless experience. 2. **Clear the cached certificate:** It’s important to clear the cached certificate if you continue to experience the issue when updating to the latest LS version. - This can be done by deleting the cached certificate file. - For example, on Linux systems, you can locate and remove the file at `~/.cache/localstack/volume/cache/server.test.pem`. - The exact path may differ depending on your operating system and how you’ve started LocalStack. - Please refer to our [documentation](/aws/capabilities/config/filesystem/#localstack-volume-directory) for specific instructions. + This can be done by deleting the cached certificate file. + For example, on Linux systems, you can locate and remove the file at `~/.cache/localstack/volume/cache/server.test.pem`. + The exact path may differ depending on your operating system and how you’ve started LocalStack. + Please refer to our [documentation](/aws/capabilities/config/filesystem/#localstack-volume-directory) for specific instructions. **Workarounds for older (<v3.7.0) LocalStack versions:** -1. **Disable Certificate Download**: To prevent downloading a revoked certificate, set the environment variable `SKIP_SSL_CERT_DOWNLOAD=1`. - This will cause LocalStack to use a self-signed SSL certificate. - Additionally, it’s important to clear the cached certificate from your host machine as mentioned above. -2. **Use HTTP Instead of HTTPS**: Where possible, use `http://` instead of `https://` to avoid issues related to the revoked certificates. - This workaround works with most browsers. - However, Safari requires additional steps: - 2.1. **Safari Users**: To make this work, you’ll need to first navigate to the page in a new tab and accept the security warning. - To do this, make sure that LocalStack is started with `SKIP_SSL_CERT_DOWNLOAD=1` and that you have cleared the cached certificate as mentioned above. - Once you’ve accepted the warning, you should be able to proceed. +1. **Disable Certificate Download**: To prevent downloading a revoked certificate, set the environment variable `SKIP_SSL_CERT_DOWNLOAD=1`. + This will cause LocalStack to use a self-signed SSL certificate. + Additionally, it’s important to clear the cached certificate from your host machine as mentioned above. +2. **Use HTTP Instead of HTTPS**: Where possible, use `http://` instead of `https://` to avoid issues related to the revoked certificates. + This workaround works with most browsers. + However, Safari requires additional steps: + 2.1. **Safari Users**: To make this work, you’ll need to first navigate to the page in a new tab and accept the security warning. + To do this, make sure that LocalStack is started with `SKIP_SSL_CERT_DOWNLOAD=1` and that you have cleared the cached certificate as mentioned above. + Once you’ve accepted the warning, you should be able to proceed. ### How to update my LocalStack CLI? @@ -49,12 +51,12 @@ localstack update localstack-cli ### Is using `localhost.localstack.cloud:4566` to set as the endpoint for AWS services recommended? `localhost.localstack.cloud` is the recommended endpoint - especially for S3, in order to enable host-based bucket endpoints. + - When using this domain within LocalStack compute environments like Lambda, ECS or EC2, this domain name resolves to the LocalStack container via our DNS server available in version 2.3. - By configuring your environment, your applications can also use `localhost.localstack.cloud` to resolve to the LocalStack container via our DNS server. - In addition, we also publish an SSL certificate that is automatically used inside LocalStack, in order to enable HTTPS endpoints with valid certificates. -Across our docs, we use `localhost:4566` instead of `localhost.localstack.cloud`, to provide a fallback option to users. -The primary reason being that some users are behind a corporate firewall or an internet service provider that does not allow resolving `localhost.localstack.cloud` properly. +Across our docs, we use `localhost.localstack.cloud:4566` instead of `localhost:4566`, as this is the recommended endpoint. However, we still provide `localhost:4566` as a fallback option to users, especially for users who are behind a corporate firewall or an internet service provider that does not allow resolving `localhost.localstack.cloud` properly. ### How should I use the latest LocalStack Docker images? @@ -69,6 +71,7 @@ The diagnose endpoint is only available if you run LocalStack with `DEBUG=1`. We do push a set of different image tags for the LocalStack Docker images. When using LocalStack, you can decide which tag you want to use. These tags have different semantics and will be updated on different occasions: + - `latest` (default) - This is our default tag. It refers to the latest commit which has been fully tested using our extensive integration test suite. @@ -133,6 +136,7 @@ To fix this, set the following environment variables: Set the system locale (language for non-Unicode programs) to UTF-8 to avoid Unicode errors. Follow these steps: + - Open the Control Panel. - Go to "Clock and Region" or "Region and Language." - Click on the "Administrative" tab. @@ -148,10 +152,11 @@ A company proxy can lead to connection issues. To allow access to the `localstack/bigdata` image, use the following Docker configuration in your `docker-compose.yml` file: ```yaml + ... environment: -- HTTP_PROXY = -- NO_PROXY = .s3.localhost.localstack.cloud,127.0.0.1,*.localhost + - HTTP_PROXY = + - NO_PROXY = .s3.localhost.localstack.cloud,127.0.0.1,*.localhost ... ``` @@ -197,11 +202,12 @@ Set your DockerHub credentials: You can add in the volume `~/.docker/config.json:/config.json` where the `config.json` is saved and point the `DOCKER_CONFIG=/config.json` variable to the JSON file in the Docker image. ```yaml + ... - environment: - - DOCKER_CONFIG=/config.json - volumes: - - ~/.docker/config.json:/config.json +environment: + - DOCKER_CONFIG=/config.json +volumes: + - ~/.docker/config.json:/config.json ... ``` @@ -209,16 +215,12 @@ If you have an active AWS account, you can use the public AWS ECR image. You can use the following command to pull the image: - -```shell -docker pull public.ecr.aws/localstack/localstack:latest -``` - - -```shell -docker pull public.ecr.aws/localstack/localstack-pro:latest -``` - + + ```shell docker pull public.ecr.aws/localstack/localstack:latest ``` + + + ```shell docker pull public.ecr.aws/localstack/localstack-pro:latest ``` + ### How to increase IO performance for LocalStack's Docker image under Windows? @@ -244,6 +246,7 @@ To do so, you need to change the [`docker-compose.yml`](https://github.com/local --- As an alternative, you can set the volume as `- "~/volume:/var/lib/localstack"` then start Docker using command `wsl docker compose -f docker-compose.yml up`. + ```yaml showshowLineNumbers @@ -357,7 +360,7 @@ None of the information is sent to the internet, or stored on any external serve ### Why can't I access my LocalStack instance in the Web Application when using Chrome? If you are using Google Chrome and encounter an error accessing your LocalStack instance (e.g., at `localhost.localstack.cloud:4566`) from the [Web Application](https://app.localstack.cloud), it is likely due to Chrome's recent security changes regarding [**Private Network Access**](https://developer.chrome.com/blog/local-network-access). - + This change requires you to explicitly grant the LocalStack Web Application permission to communicate with your local network: 1. In your Chrome browser, navigate to the LocalStack Web Application: `https://app.localstack.cloud`. @@ -366,5 +369,5 @@ This change requires you to explicitly grant the LocalStack Web Application perm 4. Scroll down to the **Local network access** setting. 5. Change the setting to **Allow**. 6. Refresh the Web App page. - + This resolves the issue by allowing the public-facing Web Application to access your LocalStack instance running on your local machine. diff --git a/src/content/docs/aws/getting-started/help-support.md b/src/content/docs/aws/getting-started/help-support.md index 9fc2706f..585cdd07 100644 --- a/src/content/docs/aws/getting-started/help-support.md +++ b/src/content/docs/aws/getting-started/help-support.md @@ -24,7 +24,7 @@ We welcome any feedback as we continue to improve LocalStack for all users. :::note At the moment, we only provide support in `English`, as we are an international team with members from various regions. - This allows us to maintain clear and consistent internal communication across all our locations. +This allows us to maintain clear and consistent internal communication across all our locations. ::: ## Support Coverage @@ -36,7 +36,7 @@ At the moment, we only provide support in `English`, as we are an international | Base | [**Standard Support**](/aws/getting-started/help-support/#standard-support) | | Ultimate | [**Priority Support**](/aws/getting-started/help-support/#priority-support) | | Enterprise | [**Enterprise Support**](/aws/getting-started/help-support/#enterprise-support) | -| Student | [**Basic Support**](/aws/getting-started/help-support/#basic-support) | +| Student | [**Basic Support**](/aws/getting-started/help-support/#basic-support) | ## Support Coverage for legacy plans @@ -44,38 +44,38 @@ At the moment, we only provide support in `English`, as we are an international | ---------- | ------------------------------------------------------------------------------- | | Hobby | [**Basic Support**](/aws/getting-started/help-support/#basic-support) | | Starter | [**Standard Support**](/aws/getting-started/help-support/#standard-support) | -| Teams | [**Priority Support**](/aws/getting-started/help-support/#priority-support) | +| Teams | [**Priority Support**](/aws/getting-started/help-support/#priority-support) | | Enterprise | [**Enterprise Support**](/aws/getting-started/help-support/#enterprise-support) | ## Support features | Features | Basic | Standard | Priority | Enterprise | -| ---------------------------- |:-------:|:----------:|:----------:|:------------:| -| LocalStack documentation | ✅ | ✅ | ✅ | ✅ | -| Community support | ✅ | ✅ | ✅ | ✅ | -| Operational support | ✅ | ✅ | ✅ | ✅ | -| 1v1 technical support | | ✅ | ✅ | ✅ | -| Screen sharing sessions | | | ✅ | ✅ | -| Third-Party Tools | | | ✅ | ✅ | -| Faster response times | | | ✅ | ✅ | -| Real-time chat support\* | | | | ✅ | -| Support ticketing portal | | | | ✅ | -| SLAs | | | | ✅ | -| Direct Slack connect channel | | | | ✅ | -| Dedicated CSM and TAM | | | | ✅ | +| ---------------------------- | :---: | :------: | :------: | :--------: | +| LocalStack documentation | ✅ | ✅ | ✅ | ✅ | +| Community support | ✅ | ✅ | ✅ | ✅ | +| Operational support | ✅ | ✅ | ✅ | ✅ | +| 1v1 technical support | | ✅ | ✅ | ✅ | +| Screen sharing sessions | | | ✅ | ✅ | +| Third-Party Tools | | | ✅ | ✅ | +| Faster response times | | | ✅ | ✅ | +| Real-time chat support\* | | | | ✅ | +| Support ticketing portal | | | | ✅ | +| SLAs | | | | ✅ | +| Direct Slack connect channel | | | | ✅ | +| Dedicated CSM and TAM | | | | ✅ | - Real time chat support is offered during our [Support Business Hours](#support-business-hours) ## Support channels | Channels | Basic | Standard | Priority | Enterprise | -| --------------------- |:-------:|:----------:|:----------:|:------------:| -| Slack community | ✅ | ✅ | ✅ | ✅ | -| GitHub Issues | ✅ | ✅ | ✅ | ✅ | -| Support email | | ✅ | ✅ | ✅ | -| Web Application chat | | ✅ | ✅ | ✅ | -| Ticketing portal | | | | ✅ | -| Slack connect channel | | | | ✅ | +| --------------------- | :---: | :------: | :------: | :--------: | +| Slack community | ✅ | ✅ | ✅ | ✅ | +| GitHub Issues | ✅ | ✅ | ✅ | ✅ | +| Support email | | ✅ | ✅ | ✅ | +| Web Application chat | | ✅ | ✅ | ✅ | +| Ticketing portal | | | | ✅ | +| Slack connect channel | | | | ✅ | ## Support Resources @@ -214,9 +214,9 @@ To use LocalStack's diagnostics endpoint: - Set the environment variable `LS_LOG=trace` - Start LocalStack - Run the affected task(s) -- Call the diagnostic endpoint `curl -s localhost:4566/_localstack/diagnose > diagnose.json && zip diagnose.zip diagnose.json && rm diagnose.json` (Endpoint URL depends on your configuration) +- Call the diagnostic endpoint `curl -s localhost.localstack.cloud:4566/_localstack/diagnose > diagnose.json && zip diagnose.zip diagnose.json && rm diagnose.json` (Endpoint URL depends on your configuration) - Once you have the `diagnose.zip` file, please send it to our support team via our email support@localstack.cloud, or via your existing support ticket. -::: + ::: :::danger Ensure that you avoid sending the diagnostic output to public channels or forums, as it may contain sensitive information. diff --git a/src/content/docs/aws/integrations/app-frameworks/quarkus.md b/src/content/docs/aws/integrations/app-frameworks/quarkus.md index 65262eff..9873c696 100644 --- a/src/content/docs/aws/integrations/app-frameworks/quarkus.md +++ b/src/content/docs/aws/integrations/app-frameworks/quarkus.md @@ -3,7 +3,7 @@ title: Quarkus description: Use the Quarkus framework with LocalStack template: doc sidebar: - order: 3 + order: 3 --- ## Introduction @@ -68,15 +68,15 @@ Add the following dependencies to the `pom.xml` file: software.amazon.awssdk apache-client -```` +``` To configure LocalStack, add the following properties to the `application.properties` file: ```bash showshowLineNumbers -quarkus.lambda.endpoint-override=http://localhost:4566 +quarkus.lambda.endpoint-override=http://localhost.localstack.cloud:4566 -quarkus.lambda.aws.region=us-east-1 -quarkus.lambda.aws.credentials.type=static +quarkus.lambda.aws.region=us-east-1 +quarkus.lambda.aws.credentials.type=static quarkus.lambda.aws.credentials.static-provider.access-key-id=test-key quarkus.lambda.aws.credentials.static-provider.secret-access-key=test-secret ``` @@ -101,6 +101,7 @@ With GraalVM installed, you can also create a native executable binary using the ```bash ./mvnw clean package -Dnative. ``` + ::: :::note @@ -108,8 +109,8 @@ Dev Services for Amazon Services is automatically enabled for each extension add - When `quarkus.devservices.enabled` is set to false. - When `devservices.enabled` is set to false per extension (e.g., `quarkus.s3.devservices.enabled=false`). -- When the `endpoint-override` is configured (e.g., `quarkus.s3.endpoint-override=http://localhost:4566`). -::: +- When the `endpoint-override` is configured (e.g., `quarkus.s3.endpoint-override=http://localhost.localstack.cloud:4566`). + ::: ## Supported extensions @@ -128,22 +129,23 @@ Dev Services for Amazon Services is automatically enabled for each extension add The following configuration properties are fixed at build time. All the other configuration properties can be overridden at runtime. -| Property | Type | Default | -|----------------------------------------------------------|------------------------|--------------------------------------| -| `quarkus.aws.devservices.localstack.image-name` | string | `localstack/localstack:3.0.1` | -| `quarkus.aws.devservices.localstack.init-scripts-folder` | string | | -| `quarkus.aws.devservices.localstack.init-scripts-classpath`| string | | -| `quarkus.aws.devservices.localstack.init-completion-msg` | string | | -| `quarkus.aws.devservices.localstack.container-properties` | `Map` | | -| `quarkus.aws.devservices.localstack.additional-services."additional-services".enabled` | boolean | | -| `quarkus.aws.devservices.localstack.additional-services."additional-services".shared` | boolean | `false` | -| `quarkus.aws.devservices.localstack.additional-services."additional-services".service-name` | string | `localstack` | -| `quarkus.aws.devservices.localstack.additional-services."additional-services".container-properties` | `Map` | | +| Property | Type | Default | +| --------------------------------------------------------------------------------------------------- | -------------------- | ----------------------------- | +| `quarkus.aws.devservices.localstack.image-name` | string | `localstack/localstack:3.0.1` | +| `quarkus.aws.devservices.localstack.init-scripts-folder` | string | | +| `quarkus.aws.devservices.localstack.init-scripts-classpath` | string | | +| `quarkus.aws.devservices.localstack.init-completion-msg` | string | | +| `quarkus.aws.devservices.localstack.container-properties` | `Map` | | +| `quarkus.aws.devservices.localstack.additional-services."additional-services".enabled` | boolean | | +| `quarkus.aws.devservices.localstack.additional-services."additional-services".shared` | boolean | `false` | +| `quarkus.aws.devservices.localstack.additional-services."additional-services".service-name` | string | `localstack` | +| `quarkus.aws.devservices.localstack.additional-services."additional-services".container-properties` | `Map` | | :::note + - If `quarkus.aws.devservices.localstack.additional-services."additional-services".enabled` is set to `true` and the endpoint-override is not configured, LocalStack will be started and utilized instead of the provided configuration. For all services excluding Cognito, LocalStack will function as the core cloud emulator. - In the case of Cognito, the emulation/mocking will be done by Moto. + In the case of Cognito, the emulation/mocking will be done by Moto. - The `quarkus.aws.devservices.localstack.additional-services."additional-services".shared` indicates whether the LocalStack container managed by Dev Services is shared. In shared mode, Quarkus utilizes label-based service discovery, specifically the `quarkus-dev-service-localstack` label, to identify running containers. If a matching container is found, it is used. @@ -155,7 +157,7 @@ All the other configuration properties can be overridden at runtime. Otherwise, it creates a new container with the `quarkus-dev-service-localstack` label set to the specified value. In test mode, Dev Services groups services with the same service-name value into a single container instance. This property is useful when there's a requirement for multiple shared LocalStack instances. -::: + ::: ### Specific configuration @@ -174,4 +176,4 @@ To start additional services for which a Quarkus extension does not exist or is ```bash quarkus.aws.devservices.localstack.additional-services."kinesis".enabled=true quarkus.aws.devservices.localstack.additional-services."redshift".enabled=true -``` \ No newline at end of file +``` diff --git a/src/content/docs/aws/integrations/app-frameworks/serverless-framework.md b/src/content/docs/aws/integrations/app-frameworks/serverless-framework.md index f7617fe8..ebd8dc37 100644 --- a/src/content/docs/aws/integrations/app-frameworks/serverless-framework.md +++ b/src/content/docs/aws/integrations/app-frameworks/serverless-framework.md @@ -3,7 +3,7 @@ title: Serverless Framework description: Use the Serverless Framework with LocalStack. template: doc sidebar: - order: 1 + order: 1 --- ## Overview @@ -20,11 +20,11 @@ In particular, the setup consists of the following two steps. This guide assumes that you have the following tools installed. -* LocalStack ([Install](/aws/getting-started/installation)) -* Serverless ([Install](https://www.serverless.com/framework/docs/getting-started/)) +- LocalStack ([Install](/aws/getting-started/installation)) +- Serverless ([Install](https://www.serverless.com/framework/docs/getting-started/)) It also assumes that you already have a Serverless app set up consisting of a couple of Lambda functions and a `serverless.yml` file similar to the following. -An example Serverless app integrated with LocalStack can be found here: Simple REST API using the Serverless Framework and LocalStack +An example Serverless app integrated with LocalStack can be found here: Simple REST API using the Serverless Framework and LocalStack ```yaml showshowLineNumbers service: my-service @@ -67,6 +67,7 @@ resources: ## Install and configure Serverless-LocalStack Plugin To install the plugin, execute the following command in the root of your project. + ```bash npm install -D serverless-localstack ``` @@ -74,8 +75,8 @@ npm install -D serverless-localstack Next, set up the plugin by adding the following properties to `serverless.yml`. ```yaml -... +... plugins: - serverless-localstack @@ -103,7 +104,7 @@ dynamodb = boto3.resource('dynamodb') By default, this call attempts to create a connection via the usual AWS endpoints. However, when running services in LocalStack, we need to make sure, our applications creates a connection via the LocalStack endpoint instead. -Usually, all of LocalStack's services are available via a specific port on localhost (e.g. `localhost:4566`). +Usually, all of LocalStack's services are available via a specific port on localhost (e.g. `localhost.localstack.cloud:4566`). However, this endpoint only works when accessing LocalStack from outside its Docker runtime. Since the Lambda functions execute within the LocalStack Docker container, Lambda functions cannot access other services via the usual localhost endpoint. @@ -131,11 +132,13 @@ In LocalStack Pro, no code changes are required using our [Transparent Endpoint You can now deploy your Serverless service to LocalStack. First, start LocalStack by running + ```bash localstack start ``` Then deploy the endpoint by running + ```bash serverless deploy --stage local ``` @@ -167,14 +170,14 @@ resources: 35 api keys: None endpoints: - http://localhost:4566/restapis/XXXXXXXXXX/local/_user_request_ + http://localhost.localstack.cloud:4566/restapis/XXXXXXXXXX/local/_user_request_ functions: ... layers: None ``` -Use the displayed endpoint `http://localhost:4566/restapis/XXXXXXXXXX/local/_user_request_/my/custom/endpoint` to make requests to the deployed service. +Use the displayed endpoint `http://localhost.localstack.cloud:4566/restapis/XXXXXXXXXX/local/_user_request_/my/custom/endpoint` to make requests to the deployed service. ## Advanced topics @@ -196,4 +199,4 @@ When this flag is set, the lambda code will be mounted into the container runnin ## Ran into trouble? -If you run into any issues or problems while integrating LocalStack with your Serverless app, please [submit an issue](https://github.com/localstack/serverless-localstack/issues). \ No newline at end of file +If you run into any issues or problems while integrating LocalStack with your Serverless app, please [submit an issue](https://github.com/localstack/serverless-localstack/issues). diff --git a/src/content/docs/aws/integrations/aws-native-tools/aws-cdk.md b/src/content/docs/aws/integrations/aws-native-tools/aws-cdk.md index e699bac3..7f7e49ed 100644 --- a/src/content/docs/aws/integrations/aws-native-tools/aws-cdk.md +++ b/src/content/docs/aws/integrations/aws-native-tools/aws-cdk.md @@ -3,7 +3,7 @@ title: AWS CDK description: Use the AWS CDK (Cloud Development Kit) with LocalStack. template: doc sidebar: - order: 2 + order: 2 --- ![AWS CDK](public/images/aws/aws-cdk-logo.svg) @@ -46,15 +46,15 @@ cdklocal --help The following environment variables can be configured: -* `AWS_ENDPOINT_URL`: The endpoint URL (i.e., protocol, host, and port) to connect to LocalStack (default: `http://localhost:4566`) -* `LAMBDA_MOUNT_CODE`: Whether to use local Lambda code mounting (via setting `hot-reload` S3 bucket name) +- `AWS_ENDPOINT_URL`: The endpoint URL (i.e., protocol, host, and port) to connect to LocalStack (default: `http://localhost.localstack.cloud:4566`) +- `LAMBDA_MOUNT_CODE`: Whether to use local Lambda code mounting (via setting `hot-reload` S3 bucket name) ### Example Make sure that LocalStack is installed and successfully started with the required services before running the example ```bash -curl http://localhost:4566/_localstack/health +curl http://localhost.localstack.cloud:4566/_localstack/health ``` The CDK command line ships with a sample app generator to run a quick test for getting started. @@ -92,7 +92,7 @@ awslocal sns list-topics Updating CDK stacks may result in deployment failures and inconsistent state within LocalStack. It is advisable to prioritize re-creating (deleting and re-deploying) over updating stacks. -:::note +:::note CDK Asset deployment (e.g., Lambda code, S3 content) requires a LocalStack paid plan. @@ -112,8 +112,8 @@ However, issues exist for `aws-cdk >= 2.177.0`. For these versions: -* We unset AWS-related environment variables like `AWS_PROFILE` before calling `cdk`. -* We explicitly set `AWS_ENDPOINT_URL` and `AWS_ENDPOINT_URL_S3` to point to LocalStack. +- We unset AWS-related environment variables like `AWS_PROFILE` before calling `cdk`. +- We explicitly set `AWS_ENDPOINT_URL` and `AWS_ENDPOINT_URL_S3` to point to LocalStack. Some environment variables may cause conflicting config, such as wrong region or accidental deploys to real AWS. To allow specific variables (e.g., `AWS_REGION`), use `AWS_ENVAR_ALLOWLIST`: diff --git a/src/content/docs/aws/integrations/aws-native-tools/aws-cli.md b/src/content/docs/aws/integrations/aws-native-tools/aws-cli.md index 5af2977b..6cfdbcaa 100644 --- a/src/content/docs/aws/integrations/aws-native-tools/aws-cli.md +++ b/src/content/docs/aws/integrations/aws-native-tools/aws-cli.md @@ -3,7 +3,7 @@ title: AWS CLI description: Use AWS Command Line Interface (CLI) to create local AWS resources with LocalStack. template: doc sidebar: - order: 1 + order: 1 --- ## Introduction @@ -27,8 +27,8 @@ pip install awscli You can configure the AWS CLI to redirect AWS API requests to LocalStack using two approaches: -* [Configuring an endpoint URL](#configuring-an-endpoint-url) -* [Configuring a custom profile](#configuring-a-custom-profile) +- [Configuring an endpoint URL](#configuring-an-endpoint-url) +- [Configuring a custom profile](#configuring-a-custom-profile) ### Configuring an endpoint URL @@ -40,7 +40,7 @@ export AWS_ACCESS_KEY_ID="test" export AWS_SECRET_ACCESS_KEY="test" export AWS_DEFAULT_REGION="us-east-1" -aws --endpoint-url=http://localhost:4566 kinesis list-streams +aws --endpoint-url=http://localhost.localstack.cloud:4566 kinesis list-streams ``` :::note @@ -57,7 +57,7 @@ Add the following profile to your AWS configuration file (by default, this file [profile localstack] region=us-east-1 output=json -endpoint_url = http://localhost:4566 +endpoint_url = http://localhost.localstack.cloud:4566 ``` Add the following profile to your AWS credentials file (by default, this file is at `~/.aws/credentials`): @@ -100,6 +100,7 @@ If you would rather manage your own `awscli` version (e.g., `v1` or `v2`) and on ```bash pip install awscli-local ``` + ::: :::note @@ -118,19 +119,20 @@ awslocal kinesis list-streams ### Configuration -| Variable Name | Description | -|---------------------|--------------------------------------------------| -| AWS_ENDPOINT_URL | The endpoint URL to connect to (takes precedence over USE_SSL/LOCALSTACK_HOST) | -| LOCALSTACK_HOST | (deprecated) A variable defining where to find LocalStack (default: localhost:4566) | -| USE_SSL | (deprecated) Whether to use SSL when connecting to LocalStack (default: False) | +| Variable Name | Description | +| ---------------- | ----------------------------------------------------------------------------------- | +| AWS_ENDPOINT_URL | The endpoint URL to connect to (takes precedence over USE_SSL/LOCALSTACK_HOST) | +| LOCALSTACK_HOST | (deprecated) A variable defining where to find LocalStack (default: localhost:4566) | +| USE_SSL | (deprecated) Whether to use SSL when connecting to LocalStack (default: False) | ### Current Limitations Please note that there is a known limitation for using the `cloudformation package ...` command with the AWS CLI v2. The problem is that the AWS CLI v2 is [not available as a package on pypi.org](https://github.com/aws/aws-cli/issues/4947), but is instead shipped as a binary package that cannot be easily patched from `awslocal`. To work around this issue, you have 2 options: -* Downgrade to the v1 AWS CLI (this is the recommended approach) -* There is an unofficial way to install AWS CLI v2 from sources. + +- Downgrade to the v1 AWS CLI (this is the recommended approach) +- There is an unofficial way to install AWS CLI v2 from sources. We do not recommend this, but it is technically possible. Also, you should install these libraries in a Python virtualenv, to avoid version clashes with other libraries on your system: @@ -170,7 +172,7 @@ Then modify the `docker-compose.yml` specifying the network to use: networks: default: external: - name: "localstack" + name: 'localstack' ``` Run AWS Cli v2 docker container using this network (example): diff --git a/src/content/docs/aws/integrations/aws-sdks/cpp.md b/src/content/docs/aws/integrations/aws-sdks/cpp.md index ccb2fb68..19d48f09 100644 --- a/src/content/docs/aws/integrations/aws-sdks/cpp.md +++ b/src/content/docs/aws/integrations/aws-sdks/cpp.md @@ -3,7 +3,7 @@ title: AWS C++ description: How to use the C++ AWS SDK with LocalStack. template: doc sidebar: - order: 2 + order: 2 --- ## Overview @@ -36,7 +36,7 @@ int main() // create SQS client with local endpoint configuration Aws::Client::ClientConfiguration clientConfig; - clientConfig.endpointOverride = "http://localhost:4566"; + clientConfig.endpointOverride = "http://localhost.localstack.cloud:4566"; SQS::SQSClient client = SQS::SQSClient(clientConfig); // create queue @@ -88,7 +88,7 @@ Once compiled, we'll see the following output when running the application: Creating queue ... Sending message ... Receiving message ... -Received 1 messages from queue http://localhost:4566/000000000000/test-queue +Received 1 messages from queue http://localhost.localstack.cloud:4566/000000000000/test-queue Received message: MessageId: 4731b327-49b2-4410-a8da-2c479e7bde04 ReceiptHandle: ZTQ1M2Q1ZjYtMjBkZS00ODQxLTlkYzQtMjBlMGQ4MDNkODVkIGFybjphd3M6c3FzOnVzLWVhc3QtMTowMDAwMDAwMDAwMDA6dGVzdC1xdWV1ZSA0NzMxYjMyNy00OWIyLTQ0MTAtYThkYS0yYzQ3OWU3YmRlMDQgMTY3ODIxMjExMS42ODk1NTE= @@ -99,5 +99,5 @@ Delete message success result: 1 ## Resources -* [AWS SDK for C++](https://docs.aws.amazon.com/sdk-for-cpp) -* [Getting Started Guide](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) \ No newline at end of file +- [AWS SDK for C++](https://docs.aws.amazon.com/sdk-for-cpp) +- [Getting Started Guide](https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/getting-started.html) diff --git a/src/content/docs/aws/integrations/aws-sdks/index.md b/src/content/docs/aws/integrations/aws-sdks/index.md index 58b50c20..7c4ca120 100644 --- a/src/content/docs/aws/integrations/aws-sdks/index.md +++ b/src/content/docs/aws/integrations/aws-sdks/index.md @@ -3,7 +3,7 @@ title: Overview description: Use LocalStack with AWS SDKs to manage your AWS resources locally. template: doc sidebar: - order: 1 + order: 1 --- ## Introduction @@ -15,8 +15,8 @@ This lets you develop and test your applications locally without connecting to t To connect to LocalStack services using AWS SDKs, you can use one of the following methods: -- **Manual configuration:** Manually configure the SDK to connect to LocalStack services by setting the endpoint URL to `http://localhost:4566` or `localhost.localstack.cloud:4566`. -This can also be specified using a [profile or an environment variable](https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html). +- **Manual configuration:** Manually configure the SDK to connect to LocalStack services by setting the endpoint URL to `http://localhost.localstack.cloud:4566` or `localhost:4566`. + This can also be specified using a [profile or an environment variable](https://docs.aws.amazon.com/sdkref/latest/guide/feature-ss-endpoints.html). - **Transparent endpoint injection (recommended):** Connect to LocalStack services without modifying your application code. -Transparent endpoint injection uses the integrated DNS server to resolve AWS API calls to target LocalStack. + Transparent endpoint injection uses the integrated DNS server to resolve AWS API calls to target LocalStack. Refer to the [Transparent Endpoint Injection](/aws/capabilities/networking/transparent-endpoint-injection/) guide for more information. diff --git a/src/content/docs/aws/integrations/aws-sdks/net.md b/src/content/docs/aws/integrations/aws-sdks/net.md index 233e86c8..d08f43cb 100644 --- a/src/content/docs/aws/integrations/aws-sdks/net.md +++ b/src/content/docs/aws/integrations/aws-sdks/net.md @@ -3,7 +3,7 @@ title: AWS .NET description: How to use the .NET AWS SDK with LocalStack. template: doc sidebar: - order: 1 + order: 1 --- ## Overview @@ -18,7 +18,7 @@ Here is an example of how to create an `LambdaClient` with the endpoint set to L ```csharp var lambdaClient = new AmazonLambdaClient(new AmazonLambdaConfig( { - ServiceURL = "http://localhost:4566" + ServiceURL = "http://localhost.localstack.cloud:4566" } ); ``` @@ -28,7 +28,7 @@ If you want to specify a region and credentials when creating the client, please ```csharp var lambdaClient = new AmazonLambdaClient(new BasicAWSCredentials("test", "test"), new AmazonLambdaConfig( { - ServiceURL = "http://localhost:4566", + ServiceURL = "http://localhost.localstack.cloud:4566", AuthenticationRegion = "eu-west-1" } ); @@ -58,7 +58,7 @@ The S3 service endpoint is slightly different from the other service endpoints, ```csharp var config = new AmazonS3Config( { - ServiceURL = "http://localhost:4566", + ServiceURL = "http://localhost.localstack.cloud:4566", ForcePathStyle = true } ); diff --git a/src/content/docs/aws/integrations/aws-sdks/ruby.md b/src/content/docs/aws/integrations/aws-sdks/ruby.md index 7a6c3594..7bbed35a 100644 --- a/src/content/docs/aws/integrations/aws-sdks/ruby.md +++ b/src/content/docs/aws/integrations/aws-sdks/ruby.md @@ -3,7 +3,7 @@ title: AWS Ruby description: How to use the Ruby AWS SDK with LocalStack. template: doc sidebar: - order: 8 + order: 8 --- ## Overview @@ -92,7 +92,7 @@ For alternative AWS services, you can use the following configuration: ```ruby showshowLineNumbers region = "us-east-2" Aws.config.update( - endpoint: 'http://localhost:4566', # update with localstack endpoint + endpoint: 'http://localhost.localstack.cloud:4566', # update with localstack endpoint access_key_id: 'test', # update with localstack credentials secret_access_key: 'test', # update with localstack credentials region: region, @@ -101,5 +101,5 @@ Aws.config.update( ## Resources -* [AWS SDK for Ruby](https://aws.amazon.com/sdk-for-ruby/) -* [Official repository of the AWS SDK for Ruby](https://github.com/aws/aws-sdk-ruby) \ No newline at end of file +- [AWS SDK for Ruby](https://aws.amazon.com/sdk-for-ruby/) +- [Official repository of the AWS SDK for Ruby](https://github.com/aws/aws-sdk-ruby) diff --git a/src/content/docs/aws/integrations/infrastructure-as-code/crossplane.md b/src/content/docs/aws/integrations/infrastructure-as-code/crossplane.md index 3a467772..453749e5 100644 --- a/src/content/docs/aws/integrations/infrastructure-as-code/crossplane.md +++ b/src/content/docs/aws/integrations/infrastructure-as-code/crossplane.md @@ -3,7 +3,7 @@ title: Crossplane description: Use the Crossplane cloud-native control plane framework with LocalStack. template: doc sidebar: - order: 3 + order: 3 --- ## Overview @@ -20,15 +20,16 @@ In the following, we provide a step-by-step guide for installing Crossplane in a ### Prerequisites -* LocalStack running in local Docker -* A local Kubernetes cluster: - * We can use the [embedded Kubernetes cluster](https://docs.docker.com/desktop/kubernetes) that ships with modern versions of Docker Desktop (can be easily enabled in the Docker settings) - * Alternatively, you can [create a local EKS cluster](/aws/services/eks/#create-an-embedded-kubernetes-cluster) in LocalStack directly, which will spin up a light-weight embedded `k3d` Kubernetes cluster in your Docker environment -* The [`helm`](https://helm.sh) and [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl) command-line clients installed +- LocalStack running in local Docker +- A local Kubernetes cluster: + - We can use the [embedded Kubernetes cluster](https://docs.docker.com/desktop/kubernetes) that ships with modern versions of Docker Desktop (can be easily enabled in the Docker settings) + - Alternatively, you can [create a local EKS cluster](/aws/services/eks/#create-an-embedded-kubernetes-cluster) in LocalStack directly, which will spin up a light-weight embedded `k3d` Kubernetes cluster in your Docker environment +- The [`helm`](https://helm.sh) and [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl) command-line clients installed ## Installing Crossplane in local Kubernetes Once your `kubectl` is configured to point to the local Kubernetes cluster, we first install Crossplane via `helm`: + ```bash helm repo add crossplane-stable https://charts.crossplane.io/stable helm repo update @@ -37,14 +38,18 @@ helm install crossplane crossplane-stable/crossplane --namespace crossplane-syst The installation may take a few minutes. In parallel, we can install the `crossplane` command-line tool. + ```bash curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | bash sudo mv crossplane /usr/local/bin ``` + To confirm that the installation was successful, we can run these commands, which should yield output similar to the following: + ```bash crossplane version ``` + ```bash title="Output" Client Version: v1.17.0 Server Version: v1.17.0 @@ -53,6 +58,7 @@ Server Version: v1.17.0 ```bash kubectl get crds | grep crossplane ``` + ```bash title="Output" compositions.apiextensions.crossplane.io 2023-09-03T11:30:36Z configurations.pkg.crossplane.io 2023-09-03T11:30:36Z @@ -66,6 +72,7 @@ For example, there is a separate provider for each individual AWS service (like In the following, we first install the AWS provider for S3. Note that you can copy/paste the entire multi-line command below into your terminal: + ```bash cat <