Open normj opened 1 week ago
Consider using the RunAsContainer
pattern we use here
var redis = builder.AddAzureRedis("redis").RunAsContainer();
Consider using the
RunAsContainer
pattern we use herevar redis = builder.AddAzureRedis("redis").RunAsContainer();
My Azure ignorance here but what does AddAzureRedis("redis")
do without the the RunAsContainer()
? I assume that would be an indication when doing deployment that an Azure redis should be provisioned. In this case you would never provision the service DynamoDB.
what does AddAzureRedis("redis") do without the the RunAsContainer()? I assume that would be an indication when doing deployment that an Azure redis should be provisioned.
If you just call .AddAzureRedis("redis")
, it will provision an Azure Cache for Redis both at F5 time and during publish. When you call .AddAzureRedis("redis").RunAsContainer()
, it will use the local container during F5 time and it will provision an Azure Redis service during publish.
In this case you would never provision the service DynamoDB.
Not even at publish time? What happens then?
In this case you would never provision the service DynamoDB.
Not even at publish time? What happens then?
Within DynamoDB you would provision tables but you don't provision the service. And the tables would be provision via the CloudFormation integration. This is all about setting up the emulator and redirecting the SDK when attempting to access the DynamoDB service go to the local emulator.
There is a user experience question on how to create the tables within DynamoDB local because CloudFormation isn't going to do anything with the local emulator. So table creation for DynamoDB local would be done differently then when using the real service. Right now I would do it with adding a "Data Loader" project to the Aspire resource that took care of making sure DynamoDB local had all the table creation and data seeding. What I also want to experiment with is extending the AddAWSDynamoDBLocal
with some fluent methods to define the local emulation tables.
Description of changes: Adds a new
AddAWSDynamoDBLocal
extension method for adding the DynamoDB Local container image to the Aspire application. When the DynamoDB Local Aspire resource is added as a reference to projects theAWS_ENDPOINT_URL_DYNAMODB
environment variable is set. DynamoDB service clients created in the application that rely on the SDK to resolve the region/endpoint will pick up the environment variable. TheAWS_ENDPOINT_URL_DYNAMODB
will take precedence over theAWS_REGION
environment variable.PR is still in draft mode while investigate what other options besides
DisableDynamoDBLocalTelemetry
should be added and I need to add tests. For now you can see the PR in action by looking at the playground application.Sample of what the user experience is like.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.