-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Describe how to use Localstack to improve the development experience …
…with AWS (#6875) * Create a new resource describing how to use LocalStack to improve local development with AWS * Add reference to using LocalStack in the ServiceControl Transport Configuration. Add LocalStack documentation in the menu. * add empty AWS index.md * Update nservicebus/aws/index.md * Update nservicebus/aws/index.md * Apply suggestions from code review Co-authored-by: David Boike <[email protected]> * Apply suggestions from code review Co-authored-by: David Boike <[email protected]> * Update nservicebus/aws/local-development.md * Update nservicebus/aws/local-development.md * Link to local development support from "at a glance" tables * Shows the configuration for all services * Apply suggestions from code review Co-authored-by: Mauro Servienti <[email protected]> * Fixit --------- Co-authored-by: Mauro Servienti <[email protected]> Co-authored-by: David Boike <[email protected]>
- Loading branch information
1 parent
f7f264d
commit 9d2d586
Showing
7 changed files
with
77 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: Particular Platform AWS support | ||
summary: AWS services supported by the Particular Platform | ||
reviewed: 2024-10-29 | ||
--- | ||
|
||
The Particular Platform supports the following AWS services: | ||
|
||
- Amazon SQS and SNS through the [NServiceBus Amazon SQS transport](/transports/sqs/) | ||
- Amazon DynamoDB through the [NServiceBus AWS DynamoDB persistence](/persistence/dynamodb/) | ||
- The various relational databases available on AWS, such as RDS, MySQL, or PostgreSQL through the [NServiceBus SQL persistence](/persistence/sql/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: AWS local development using LocalStack | ||
summary: How to use LocalStack for your development needs when using Amazon SQS Transport and DynamoDB Persistence | ||
reviewed: 2024-10-29 | ||
--- | ||
|
||
[LocalStack](https://www.localstack.cloud/) is a tool to develop and test your AWS applications locally, reducing development time and increasing productivity. | ||
|
||
> [!NOTE] | ||
> Refer to the [official LocalStack documentation](https://docs.localstack.cloud/getting-started/installation/) to learn how to install and run it locally. | ||
To configure an NServiceBus endpoint to connect to LocalStack instead of AWS, the AWS endpoint URL must be set to the address of the LocalStack instance. The simplest way is by defining the `AWS_ENDPOINT_URL` environment variable and setting its value to the LocalStack URL: | ||
|
||
``` | ||
AWS_ENDPOINT_URL=http://localhost.localstack.cloud:4566 | ||
``` | ||
|
||
Alternatively, configure the AWS SDK `ServiceURL` configuration property, like in the following example programmatically for the Amazon SQS transport: | ||
|
||
```csharp | ||
var amazonSqsConfig = new AmazonSQSConfig(); | ||
amazonSqsConfig.ServiceURL = "http://localhost.localstack.cloud:4566"; | ||
var amazonSqsClient = new AmazonSQSClient(amazonSqsConfig); | ||
``` | ||
|
||
Similarly, the Amazon SNS and DynamoDB configurations must follow the same patter. The following snippet shows the SNS configuration: | ||
|
||
```csharp | ||
var amazonSnsConfig = new AmazonSimpleNotificationServiceConfig(); | ||
amazonSnsConfig.ServiceURL = "http://localhost.localstack.cloud:4566"; | ||
var amazonSnsClient = new AmazonSimpleNotificationServiceClient(amazonSnsConfig); | ||
``` | ||
|
||
The DynamoDB configuration is shown in the following example: | ||
|
||
```csharp | ||
var amazonDynamoDBConfig = new AmazonDynamoDBConfig(); | ||
amazonDynamoDBConfig.ServiceURL = "http://localhost.localstack.cloud:4566"; | ||
var amazonDynamoDBClient = new AmazonDynamoDBClient(amazonDynamoDBConfig); | ||
``` | ||
|
||
> [!NOTE] | ||
> Remember that, even if you are not connecting to AWS cloud services, it is still required to specify access credentials and region. | ||
> From the LocalStack perspective they could be fake values, like the following: | ||
> | ||
> ```bash | ||
> AWS_ACCESS_KEY_ID=demo | ||
> AWS_SECRET_ACCESS_KEY=demo | ||
> AWS_REGION=us-east-1 | ||
> ``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters