Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi,
I’m trying to use the AWS Javascript SDK with spaces but for some reason I’m getting the following error in the Javascript console:
“missing token ‘authorization’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel”
AFAIK, this is an auth error but I thought the AWS SDK handles auth automatically.
Here is my code:
URL = "https://{$REIGON}.digitaloceanspaces.com/"
var ep = new AWS.Endpoint(URL);
var s3 = new AWS.S3({
endpoint: ep,
accessKeyId: "{$ACCESSKEY}",
secretAccessKey: "{$SECRETKEY}",
});
s3.listBuckets({}, function(err, data) {
if (err) console.log(err, err.stack);
else console.log(dat);
});
s3.getObject(
{ Bucket: "bucket1", Key: "keyvalue" },
function (error, data) {
if (error != null) {
alert("Failed to retrieve object: " + error);
} else {
alert("Loaded" + data.ContentLength + " bytes");
}
}
);
2528527458a540fba5c38cc921bb27
jhonnydepp12
Peter Alison
Arnold Hendriks
384d3f11289345379905a243f7b817
Laveenk16
Laveenk16
e8ab71f9e5914ffba3313f6ac33bb3
1c3ae38719bc49de9abf588e704583
lincoln
76ac182105344670910aa7c62ff2a3
c3d53dcb398b418288ff41b565183d