mercredi 3 juin 2015

Visual Studio Desktop Application with AWS Profile

I have this working fine in DEV. I can upload images to S3 for AWS. It is a desktop application that is using an AWS profile that I setup in the AWS explorer in Visual Studio (I called the profile "production"). Again, that works fine. My App.config has this line.

<add key="AWSProfileName" value="production" />

Wen I put the application on a production machine, I get the a credential error. Why doesn't it see my credentials on the production machine? Shouldn't the come over when I publish the application? What do I have to do to bring the profile information to production? Thank you.

Amazon.Runtime.AmazonServiceException: Unable to find credentials 

Exception 1 of 4: 
System.ArgumentException: App.config does not contain credentials information. Either add the AWSAccessKey and AWSSecretKey or AWSProfileName. 
 at Amazon.Runtime.StoredProfileAWSCredentials..ctor(String profileName, String profilesLocation) 
 at Amazon.Runtime.EnvironmentAWSCredentials..ctor() 
 at Amazon.Runtime.FallbackCredentialsFactory.b__1() 
 at Amazon.Runtime.FallbackCredentialsFactory.GetCredentials(Boolean fallbackToAnonymous) 

Exception 2 of 4: 
System.ArgumentException: App.config does not contain credentials information. Either add the AWSAccessKey and AWSSecretKey or AWSProfileName. 
 at Amazon.Runtime.StoredProfileAWSCredentials..ctor(String profileName, String profilesLocation) 
 at Amazon.Runtime.FallbackCredentialsFactory.b__2() 
 at Amazon.Runtime.FallbackCredentialsFactory.GetCredentials(Boolean fallbackToAnonymous) 

Exception 3 of 4: 
System.InvalidOperationException: The environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY were not set with AWS credentials. 
 at Amazon.Runtime.EnvironmentVariablesAWSCredentials..ctor() 
 at Amazon.Runtime.FallbackCredentialsFactory.b__3() 
 at Amazon.Runtime.FallbackCredentialsFactory.GetCredentials(Boolean fallbackToAnonymous) 

Exception 4 of 4: 
Amazon.Runtime.AmazonServiceException: Unable to reach credentials server 
 at Amazon.Runtime.InstanceProfileAWSCredentials.GetContents(Uri uri) 
 at Amazon.Runtime.InstanceProfileAWSCredentials.d__0.MoveNext() 
 at Amazon.Runtime.InstanceProfileAWSCredentials.GetFirstRole() 
 at Amazon.Runtime.FallbackCredentialsFactory.b__4() 
 at Amazon.Runtime.FallbackCredentialsFactory.GetCredentials(Boolean fallbackToAnonymous) 


 at Amazon.Runtime.FallbackCredentialsFactory.GetCredentials(Boolean fallbackToAnonymous) 
 at Amazon.S3.AmazonS3Client..ctor(RegionEndpoint region) 
 at SRC_XRay_Sync_Application.MainWindow.startUpload()




Aucun commentaire:

Enregistrer un commentaire