无法在CredentialProfileStoreChain中找到默认配置文件?

时间:2017-07-26 20:09:00

标签: c# amazon-web-services aws-lambda xunit.net

当我尝试为我正在编写的lambda运行单元测试时,我得到了Amazon.Runtime.AmazonServiceException。 当我通过测试功能(AWS UI测试功能)运行它或者我在aws中上传它时,lambda工作正常并使用配置文件凭据。 但是,当我尝试运行单元测试时,我得到凭证未找到错误。我尝试过尝试使用以下详细信息添加App.config的其他方法:

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="aws" type="Amazon.AWSSection, AWSSDK.Core" />
  </configSections>
  <aws 
    region="us-east-1" 
    profileName="default"
    profilesLocation="C:\Amazon\awsfile\credentials" />

</configuration>

通过在上述文件中添加凭据。 当我调试下面的代码时抛出异常:

var client = new AmazonDynamoDBClient();

0 个答案:

没有答案