How to resolve Network Failure net::ERR_NAME_NOT_RESOLVED

enter image description hereI am doing a Get request to AWS. Fetching the list of bucket through browser(Javascript). I'm getting the below error:

Failed to load resource: net::ERR_NAME_NOT_RESOLVED. When I leave region blank, I get following errors. please see the screen shot above for errors i m getting.

This is my code:

<!DOCTYPE html>
<html>
    <head>

        <script src=""></script>

    </head>
    <body>

        <div id="status"></div>
        <ul id="objects"></ul>
    </body>

    <script type="text/javascript">
    AWS.config.update({accessKeyId: 'key', secretAccessKey: 'GwP/secretkey/XkoAd89kGs'});
        // Configure your region
        AWS.config.region = 'US Standard';

        var bucket = new AWS.S3({params: {Bucket: 'rentonclick'}});
    bucket.listObjects(function (err, data) {
        if (err) {
            console.log('error',err);
        } else {
            document.getElementById('status').innerHTML =
                'Loaded ' + data.Contents.length + ' items from S3';
            for (var i = 0; i < data.Contents.length; i++) {
                document.getElementById('objects').innerHTML +=
                    '<li>' + data.Contents[i].Key + '</li>';
            }
        }
    });

    </script>

</html>

I am also sharing the plunker -


ANSWERS:


It looks like your Amazon AWS region is invalid.

Please look for your region in your Amazon AWS dashboard. It should look like this.

AWS.config.region = 'us-east-1';

Goodluck.


We need configure CORS like this - This worked for me.

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <CORSRule>
        <AllowedOrigin>*</AllowedOrigin>
        <AllowedMethod>HEAD</AllowedMethod>
        <AllowedMethod>GET</AllowedMethod>
        <AllowedMethod>PUT</AllowedMethod>
        <AllowedMethod>POST</AllowedMethod>
        <AllowedMethod>DELETE</AllowedMethod>
        <ExposeHeader>ETag</ExposeHeader>
        <AllowedHeader>*</AllowedHeader>
    </CORSRule>
</CORSConfiguration>

when i use vue axio, eg:

var config = {
   site: 'http://192.168.0.71:9000/doapi/',
}
export const API_ROOT = 'http://'.concat( config.site)
did you find something wrong: API_ROOT = 'http://'+ 'http://192.168.0.71:9000/doapi/';

'http://' has declared twice. delete it. ok



 MORE:


 ? How to empty the bucket?
 ? AWS API: How to write code that checks whether a file exists in a specific bucket?
 ? Fatest way to retrieve S3 objects metadata (NodeJS API)
 ? Time to live for SimpleDB or DynamoDB
 ? Time to live for SimpleDB or DynamoDB
 ? Time to live for SimpleDB or DynamoDB
 ? Scaling MongoDB on EC2 or should I just switch to DynamoDB?
 ? Is Amazon SimpleDB more reliable/available than DynamoDB?
 ? Amazon SimpleDB or DynamoDB
 ? Time to live of a item in dynamodb