Check the .aws directory under home directory. Windows: C:\Users<home-name>.aws Linux: ~/.aws
Under this directory, you will find the config as well as credentials file. It will have the information from the aws configure that you may have run before. IF not, then
Run aws configure
Enter the access key -
secret key - enter secret key
region - (ap-southeast-1 or us-east-1 or any other regions)
format - (json or leave it blank, it will pick up default values you may simply hit enter)
From the Step 2, you should see the config file, open it, it should have the region. Please ensure there is region specified.
You may now run the following command to list the buckets
aws s3 ls
It should work fine.