# How to run Hugo in AWS Lambda?

**URL:** <https://discourse.gohugo.io/t/how-to-run-hugo-in-aws-lambda/17316>\
**Category:** support\
**Created:** [March 1, 2019, 1:15pm UTC](https://discourse.gohugo.io/t/how-to-run-hugo-in-aws-lambda/17316 "2019-03-01T13:15:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mojoa](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@mojoa](https://discourse.gohugo.io/u/mojoa)\
**Post date:** [March 1, 2019, 1:15pm UTC](https://discourse.gohugo.io/t/how-to-run-hugo-in-aws-lambda/17316/1 "2019-03-01T13:15:45Z")

</div>

I want to run Hugo in AWS Lambda.  
Is this possible?  
If so, what would be the steps to implement?  
Thanks!

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [March 1, 2019, 4:38pm UTC](https://discourse.gohugo.io/t/how-to-run-hugo-in-aws-lambda/17316/2 "2019-03-01T16:38:06Z")

</div>

Your question is out of scope for the support forums. Please read up on the docs for that product, and seek out expert advice in its support channels. 🙂

---

<div class="post-metadata">

**Author:** ![maiki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/maiki/32/16384_2.png) [@maiki](https://discourse.gohugo.io/u/maiki)\
**Post date:** [March 1, 2019, 4:47pm UTC](https://discourse.gohugo.io/t/how-to-run-hugo-in-aws-lambda/17316/3 "2019-03-01T16:47:26Z")

</div>

Continuing the discussion from [HUGO extended in AWS Lambda and SASS](https://discourse.gohugo.io/t/hugo-extended-in-aws-lambda-and-sass/17236/7):

> [@HUGO extended in AWS Lambda and SASS](https://discourse.gohugo.io/t/hugo-extended-in-aws-lambda-and-sass/17236/7):
>
> Can you explain, provide code, links or example please?

I see that thread was closed, so this may be a continuation of a point from there, so I’ll answer: Lambda is a function as a service provider, while Hugo is a static site generator. If they are used together, it involves additional configuration, as there is no practice or method that is common with Lambda and Hugo. It is an advanced setup.

It’s possible @Axberg was mistyping or explaining their use of Lambda in an abstract way.

---

<div class="post-metadata">

**Author:** ![westurner](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/westurner/32/7980_2.png) [@westurner](https://discourse.gohugo.io/u/westurner)\
**Post date:** [March 1, 2019, 7:43pm UTC](https://discourse.gohugo.io/t/how-to-run-hugo-in-aws-lambda/17316/4 "2019-03-01T19:43:27Z")

</div>

It looks like you can run Hugo and CDN host static files with AWS Amplify [1], and call AWS Lambda serverless functions with the Amplify API [2].

[1] [https://docs.aws.amazon.com/amplify/latest/userguide/getting-started.html](https://docs.aws.amazon.com/amplify/latest/userguide/getting-started.html)  
[2] [https://aws-amplify.github.io/docs/js/api](https://aws-amplify.github.io/docs/js/api)

---

<div class="post-metadata">

**Author:** ![Axberg](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@Axberg](https://discourse.gohugo.io/u/Axberg)\
**Post date:** [March 5, 2019, 11:57am UTC](https://discourse.gohugo.io/t/how-to-run-hugo-in-aws-lambda/17316/5 "2019-03-05T11:57:47Z")

</div>

Nope didn’t mistyped, we got Hugo to render our static files executed in from a AWS Lambda. We did it in .net but maybe checkout:

> **[How to build a Hugo website in AWS Lambda and deploy it to S3](https://bezdelev.com/hacking/hugo-aws-lambda-static-website-amazon-s3/)**
>
> This tutorial explains how to run Hugo in AWS Lambda and deploy a static website to Amazon S3.

---

<div class="post-metadata">

**Author:** ![mojoa](https://avatars.discourse-cdn.com/v4/letter/m/8491ac/32.png) [@mojoa](https://discourse.gohugo.io/u/mojoa)\
**Post date:** [March 5, 2019, 6:32pm UTC](https://discourse.gohugo.io/t/how-to-run-hugo-in-aws-lambda/17316/6 "2019-03-05T18:32:44Z")

</div>

Very interesting topic and nice reference to an excellent tutorial. Thank You!
