I'm using html and javascript and I want to download a file from S3 to local disk by using this solution
So I need node.js to use "require()" I'm not sure that I use a write way to create a script or not. Here is my code
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.9.0.min.js"></script>
<script src="./script/require.js"></script>
function loadfile(id){
//I have try
//var AWS = require('aws-sdk');
//but it not work so I use
const AWS = require(["https://sdk.amazonaws.com/js/aws-sdk-2.9.0.min.js"])
var s3 = new AWS.S3();
}
and right now the problem that I got is "AWS.S3 is not a constructor"