1 Antwort
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
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);
beantwortet vor 5 Jahren
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor einem Jahr