2

I have an AWS account and I wish to upload a file using C# and Visual Studio. To do so, I am using a tutorial that I found right here on StackOverflow that requires an Access key and a Secret key.

I tried to create it in the console but it said that I do not have permissions. How do I get those keys? Is there some tutorial that is updated about this topic?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
  • To get your access key ID and secret access Key: http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSGettingStartedGuide/AWSCredentials.html To upload a file to AWS S3: http://www.codelocker.net/30385/dot-net-c-sharp-upload-a-file-to-amazon-aws-s3-with-dot-net-and-c-sharp/ – Henrique Forlani Aug 18 '16 at 21:05
  • When I do those steps I find this message: We encountered the following errors while processing your request: User: arn:aws:iam::374594064632:user/ggard is not authorized to perform: iam:ListUsers on resource: arn:aws:iam::374594064632:user/ –  Aug 18 '16 at 21:11
  • hm, you should update your question with some code here. What have you tried? In what specific part do you get this message? – Henrique Forlani Aug 18 '16 at 21:19
  • Forget about that, I created a new user and allready have those credentials, but I am following this tutorial http://stackoverflow.com/questions/25814972/how-to-upload-a-file-to-amazon-s3-super-easy-using-c-sharp But I don't know int the main class what to put in this variables string s3DirectoryName = "justdemodirectory"; string s3FileName = @"mybackupFile uploaded in 12-9-2014.zip"; –  Aug 18 '16 at 22:12

1 Answers1

1

The tutorial you are using assumes that the application has access to AWS IAM credentials.

The credentials can be provided in several ways:

  • By running the code on an Amazon EC2 instance that was launched with a Role
  • By storing AWS credentials in a configuration file
  • By storing AWS credentials in Environment Variables

For details, see:

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
  • Man I have serious problemas about uploading the file to amazon because when I create an instance of the AmazonS3 object, doesn't recognize, I guess is something about the libraries and compatibility between them. help me pls!! –  Aug 19 '16 at 15:01
  • @dayanrr91 Please post a separate question with more details, such as what you were attempting, code samples and error messages so that we can assist you. – John Rotenstein Aug 20 '16 at 01:14