- Version: 22.9.1
- Electron Version:
- Electron Type (current, beta, nightly): 11.1.0 (stable)
Target: mac OS 11.1
Electron Updater Version: 4.3.5
I set my S3 to private () and then put the following in my update script:
.......
autoUpdater.on('checking-for-update', () => {
if (w !== undefined) {
w.get('settings').content().send('check-for-updates-begin');
}
let opts = {
service: 's3',
region: 'eu-central-1',
host: s3_bucket + '.s3.eu-central-1.amazonaws.com',
path: '/latest-mac.yml' // For example....
};
aws4.sign(opts, {
accessKeyId: "XXXXX",
secretAccessKey: "XXXXXXXX"
});
autoUpdater.requestHeaders = opts.headers;
});
........
Unfortunately, I then get the following error:
Error: HttpError: 403 Forbidden
"<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
.....
Someone a solution for me?
question from:https://stackoverflow.com/questions/65914263/auto-updater-does-not-work-for-amazon-s3-private-bucket