Visual Studio Desktop Application with AWS Profile -
i have working fine in dev. can upload images s3 aws. desktop application using aws profile setup in aws explorer in visual studio (i called profile "production"). again, works fine. app.config has line.
<add key="awsprofilename" value="production" /> wen put application on production machine, credential error. why doesn't see credentials on production machine? shouldn't come on when publish application? have bring profile information production? thank you.
amazon.runtime.amazonserviceexception: unable find credentials exception 1 of 4: system.argumentexception: app.config not contain credentials information. either add awsaccesskey , awssecretkey or awsprofilename. @ amazon.runtime.storedprofileawscredentials..ctor(string profilename, string profileslocation) @ amazon.runtime.environmentawscredentials..ctor() @ amazon.runtime.fallbackcredentialsfactory.b__1() @ amazon.runtime.fallbackcredentialsfactory.getcredentials(boolean fallbacktoanonymous) exception 2 of 4: system.argumentexception: app.config not contain credentials information. either add awsaccesskey , awssecretkey or awsprofilename. @ amazon.runtime.storedprofileawscredentials..ctor(string profilename, string profileslocation) @ amazon.runtime.fallbackcredentialsfactory.b__2() @ amazon.runtime.fallbackcredentialsfactory.getcredentials(boolean fallbacktoanonymous) exception 3 of 4: system.invalidoperationexception: environment variables aws_access_key_id , aws_secret_access_key not set aws credentials. @ amazon.runtime.environmentvariablesawscredentials..ctor() @ amazon.runtime.fallbackcredentialsfactory.b__3() @ amazon.runtime.fallbackcredentialsfactory.getcredentials(boolean fallbacktoanonymous) exception 4 of 4: amazon.runtime.amazonserviceexception: unable reach credentials server @ amazon.runtime.instanceprofileawscredentials.getcontents(uri uri) @ amazon.runtime.instanceprofileawscredentials.d__0.movenext() @ amazon.runtime.instanceprofileawscredentials.getfirstrole() @ amazon.runtime.fallbackcredentialsfactory.b__4() @ amazon.runtime.fallbackcredentialsfactory.getcredentials(boolean fallbacktoanonymous) @ amazon.runtime.fallbackcredentialsfactory.getcredentials(boolean fallbacktoanonymous) @ amazon.s3.amazons3client..ctor(regionendpoint region) @ src_xray_sync_application.mainwindow.startupload()
profiles in net sdk store per user/machine. quote documentation:
the credentials in sdk store encrypted, , sdk store in user's home directory, limits risk of accidentally exposing credentials.
on production machine, should creating profile in same way, or since unlikely on such machine have visual studio installed, using aws tools windows powershell.
if security not concern, put credentials file directly in user's home directory in plaintext or specify location of credentials file. naturally not recommended you're exposing aws secret potential compromise.
<configuration> <configsections> <section name="aws" type="amazon.awssection, awssdk.core"/> </configsections> <aws profilename="production" profileslocation="c:\aws_service_credentials\mycredentials"/> </configuration> finally if production machine in ec2, argue better off using temporary credentials, instance profiles , iam roles. avoids whole hassle of trying credentials securely onto machines.
Comments
Post a Comment