|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
The following tasks guide you through using the .NET classes to send authenticated requests using your AWS account or IAM user credentials.
Making Requests Using Your AWS Account or IAM user Credentials
Create an instance of the
Execute one of the
The following C# code sample demonstrates the preceding tasks.
BasicAWSCredentials basicCredentials = new BasicAWSCredentials("*** Access Key ID ***", "*** Security Access Key ***"); AmazonS3Client s3Client = new AmazonS3Client(basicCredentials); // Send sample request (for example, list buckets). var response = s3Client.ListBuckets();
You can create the
AmazonS3Client client without providing your security
credentials. Requests sent using this client are anonymous requests, without a
signature. Amazon S3 returns an error if you send anonymous requests for a
resource that is not publicly available.
For example, to list all the object keys in your bucket, see Listing Keys Using the AWS SDK for .NET.