1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
I figured it out. For anyone who runs into this same problem, you can create a second section in your appsettings.json:
"AwsIotDataConfig": {
"Profile": "default",
"ServiceURL": "https://data.iot.us-east-1.amazonaws.com/"
},
"AwsConfig": {
"Profile": "default",
"Region": "us-east-1"
}
then in your Startup.cs, when you call GetAWSOptions, you can pass in the name of the config section:
var awsGenericOptions = Configuration.GetAWSOptions("AwsConfig");
services.AddDefaultAWSOptions(awsGenericOptions);
var awsIotDataOptions = Configuration.GetAWSOptions("AwsIotDataConfig");
and when you add the IotData service, specify that it should use the IotData specific options:
services.AddAWSService<IAmazonIoT>();
services.AddAWSService<IAmazonIotData>(awsIotDataOptions);
répondu il y a 5 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an