GithubHelp home page GithubHelp logo

jason-dour / hugo-aws-lambda-layer Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 9 KB

AWS Lambda Layer for Hugo from gohugo.io.

License: Apache License 2.0

Shell 100.00%
hugo aws aws-lambda aws-lambda-layer aws-lambda-layers lambda lambda-layer lambda-layers cloud serverless

hugo-aws-lambda-layer's Introduction

hugo-aws-lambda-layer

AWS Lambda Layer for Hugo from gohugo.io.

It is intended to be functional in all runtimes. It has been tested in go1.x and python3.8 so far.

Building the Layer

  1. Make certain you have the lambci/lambda:build-go1.x Docker image needed to build the layer.

    $ docker images
    REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE
    lambci/lambda              build-go1.x         051f7de811cf        11 days ago         2.2GB
    1. If you do not have the images, just pull them with a docker pull command.
  2. Confirm the build directory is clean.

    $ ls -1
    LICENSE
    README.md
    build.sh
  3. Then execute the docker lambci/lambda:build-go1.x image to run the build script.

    docker run --rm -it -v pwd:/tmp/repo --entrypoint /bin/bash lambci/lambda:build-go1.x /tmp/repo/build.sh

    Using the golang:1.17.1-alpine3.14 image, run the build script (can't use lamci/lambda anymore due to golang version requirement):

    docker run --rm -it -v `pwd`:tmp/repo --entrypoint /bin/bash golang:1.17.1-alpine3.14 /tmp/repo/build.sh

Deploy the Layer

Once the layer zip file is created, you can deploy it to your AWS account with the following command:

aws lambda publish-layer-version --layer-name "hugo-VERSION" --description "Hugo VERSION for All Runtimes" --license-info "Apache 2.0" --zip-file "fileb://hugo.zip"

hugo-aws-lambda-layer's People

Contributors

jason-dour avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.