AWS S3 with IAM user credentials in Postman

Pranav T P
4 min readMar 4, 2022

This article describes how you can use Postman to your AWS S3 bucket with IAM User credentials and write as short status test script. I am going to show you how to upload a file to a S3 bucket and how to test that the IAM user credentials for that bucket are working correctly. This tutorial assumes you have already setup an S3 Bucket and an IAM user with Access Key, Secrete Key and access rights to your S3 bucket.

So let’s get started in the Postman App:

In order to set up our request and auth in Postman, I first open up a new request tab for my PUT request and define the request URL as per the example in the AWS docs.

You have two options to store your bucket name and region. You can either store your S3 Bucket name and region as global variables and call those variables in your request. This is what I did here. However, you can also just replace {{myS3BucketName}} with your bucket name directly.

I then go to the Authorization tab and select ‘Type’ and then ‘AWS Signature’. Here are the Postman docs on AWS Signature setting.

I then log into my AWS console, navigate to IAM and find the user that I want to connect to my S3 Bucket. I get the IAM User AccessKey and SecretKey and provide the values to Postman. I also set the service name to s3.

I have used mainly four request methods frequently, which are as below:

  1. POST Request — For Creating Or Updating data,
  2. PUT Request — For Updating data,
  3. GET Request — For Retrieving/Fetching data and
  4. DELETE Request — For Deleting data.

Through PostMan Creating a S3 Bucket

Creating a New S3 Bucket through the Postman, and Bucket name should be unique name and once they are created status will be 200 ok means it has been created, Postman service will be PUT.

Listing a Buckets

After Creating a bucket, Now just listing all the S3 Buckets which are available at a particular Region through the Postman service (GET).

Creating a File to the Bucket and Adding content to File

Now we are creating a file in the S3 Bucket as Assignment.txt (Text Files) and on that text files having some text contents for this service we use PUT.

Listing the Contents of Bucket

Previously we have created a file in the S3 bucket and now we are listing the contents of the bucket (Assignment) so for this Postman service we uses the GET service.

Delete the Contents of Bucket

If you want to delete the files which are available in your S3 Bucket means with the help of Postman service we can delete the files (DELETE).

Delete the Bucket

Now, if we want to delete the S3 Bucket means even we can delete the bucket with the help of Postman Services.

Conclusion

Congratulations! now we have successfully Created and Deleted your S3 bucket. You can navigate to your S3 bucket in AWS. I hope this article provides you with an easy way to access the credentials and settings and helps you with developing or debugging files to AWS S3.

--

--

Pranav T P

I'm a Pranav T P. pursuing my Master (Mtech) at PES University, Banglore in a stream of Cloud Computing