I'm trying to setup healthchecks for some required services to my dotnet core 3.1 API and I'm struggling on Amazon DynamoDB check.
We're using the Xabaril healthcheck packages and the DynamoDb one ask for a DynamoDBOptions that requires the AccessKey
, SecretKey
and RegionEndpoint
.
I know the AWS SDK get this information from the environment Credentials profile configuration:
using Amazon.DynamoDBv2;
//... other usings
public void ConfigureServices(IServiceCollection services)
{
// ... other stufs
services.AddAWSService<IAmazonDynamoDB>();
// ...
}
...But I need get it too in order to set up my dependency healthcheck like this:
services.AddHealthChecks()
.AddDynamoDb(dynamoDbOptions =>
{
dynamoDbOptions .AccessKey = "<???>";
dynamoDbOptions .RegionEndpoint = Amazon.RegionEndpoint.EUWest2; // <???>
dynamoDbOptions .SecretKey = "<???>";
}, "DynamoDB");
How can I get this <???>
infos from AWS SDK packages?