HowTo: Deploying Hugo on S3 and Cloudfront

Sorry for the

hXXp links!

hopefully it should be very clear to replace the XX with tt

Hi, this looks very useful - but I can’t quite get it to work I get ?delimiter=&marker=&max-keys=1000&prefix=: unsupported protocol scheme it could well be something to do with IAM ( which not being a AWS user I’m not really sure what I’m doing as I can’t seem to attach it anywhere ) so I know you all are busy - but any ‘tips’ and ‘tricks’ would be appreciated?

I have a vague hunch that I have seen a similar error (incredibly bad error) and that that came from a AWS region mismatch, i.e.:

s3deploy -source=public/ -region=eu-west-1

So the region above must match the region where your S3 bucket is deployed. (look in the S3 properties for your bucket in

Thanks very much for that, however my region matches

$GOPATH/bin/s3deploy -key=xxxG5IGL6PDX6KTI6A -secret=pxxxxxxxxJhNYGe60NBN77lCrN/bAxPdeqgbsW -v -source=public/ -region=eu-west-2


Get / unsupported protocol scheme “”

Domain & keys altered of course

Any ideas?

Not sure, that was my best guess …

I have it working in several sites without any problems, i.e.

OK interesting you are not passing API key & Secret

where are they are they preset in ~/.aws/credentials ?

No, they are secret …

I put them in the CI as environment variables:

Which I notice I should document in the README.

But I doubt that is your issue.

No its not my issue I agree. I ran them in the environment. I also tested using aws cp which works so i know permissions are good. The main value of your code is setting the cache - as I don’t think AWS has a way without API calls of doing it highly manually file by file.

I have a deployment process that works with Firebase which performs well.

I see yuo are using CircleCI on GitHub - is it good? I’m currently using GitLab with their CI

CirclecI is very very good.

Thanks very much for this tutorial @joseph.lust and for s3deploy @bep. I was able to get two of my sites transferred into s3 with cloudfront, without too much trouble today.