{"id":15492265,"url":"https://github.com/asyrjasalo/aws-nomad-openfaas","last_synced_at":"2026-05-02T09:31:16.975Z","repository":{"id":108178949,"uuid":"132136793","full_name":"asyrjasalo/aws-nomad-openfaas","owner":"asyrjasalo","description":"Terraforming OpenFaaS to run in Nomad cluster, on AWS","archived":false,"fork":false,"pushed_at":"2018-05-04T14:27:30.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-28T16:44:26.190Z","etag":null,"topics":["aws","nomad","openfaas","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asyrjasalo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-04T12:22:07.000Z","updated_at":"2024-02-11T13:59:17.000Z","dependencies_parsed_at":"2023-07-22T22:46:11.927Z","dependency_job_id":null,"html_url":"https://github.com/asyrjasalo/aws-nomad-openfaas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/asyrjasalo/aws-nomad-openfaas","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyrjasalo%2Faws-nomad-openfaas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyrjasalo%2Faws-nomad-openfaas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyrjasalo%2Faws-nomad-openfaas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyrjasalo%2Faws-nomad-openfaas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asyrjasalo","download_url":"https://codeload.github.com/asyrjasalo/aws-nomad-openfaas/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asyrjasalo%2Faws-nomad-openfaas/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32529321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","nomad","openfaas","terraform"],"created_at":"2024-10-02T07:59:51.589Z","updated_at":"2026-05-02T09:31:16.960Z","avatar_url":"https://github.com/asyrjasalo.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"OpenFaaS in Nomad cluster on AWS\n================================\n\nThis is **bare-bones**, lacking everything extra and most notably:\n  - No https:// for OpenFaaS and Nomad (TODO: maybe use an API Gateway?)\n  - Terraform remote state locking (use e.g. [terragrunt](https://github.com/gruntwork-io/terragrunt))\n\nForked and fixed from [terraform-aws-open-faas-nomad](https://github.com/nicholasjackson/terraform-aws-open-faas-nomad), `faas.hcl` using [faas-nomad/nomad_job_files/faas.hcl](https://github.com/hashicorp/faas-nomad/blob/master/nomad_job_files/faas.hcl) as the base.\n\n\nSetup\n-----\n\n### 1. Export the AWS environment variables\n\n    export AWS_ACCESS_KEY_ID={{aws_access_key_id}}\n    export AWS_SECRET_ACCESS_KEY={{aws_secret_access_key}}\n    export AWS_SESSION_TOKEN={{aws_session_token}}\n\nTip: Prefer [aws-vault](https://github.com/99designs/aws-vault) to store\n`AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` in some keyring\n(on OS X, Linux distros).\n\n### 2. Install the command-line tools\n\n    brew install faas-cli\n    brew install nomad\n    brew install terraform\n\nTip: On GNU\\Linux, try [linuxbrew](http://linuxbrew.sh).\n\n### 3. Fetch the Terraform module deps\n\n    terraform init\n\n### 4. Plan and apply - the region is asked\n\n    terraform plan\n    terraform apply\n\n### 5. Launch OpenFaaS in Nomad\n\n    export NOMAD_ADDR=$(terraform output nomad_endpoint)\n    nomad run faas.hcl\n\n\nFunctions\n---------\n\n### Create a new function\n\n    export OPENFAAS_URL=$(terraform output openfaas_endpoint)\n    cd functions\n\nI already committed this to the repository:\n\n    faas-cli new -lang python3 pyfunc\n\nChange `image` in `.yml` to include username for [DockerHub](https://hub.docker.com), or prepend the private Docker registry url.\n\nArgument `-lang` can be `dockerfile`, to run any Docker container as a function:\n\n### Build the Docker image\n\n    faas-cli build -f pyfunc.yml\n\n### Push Docker image to Docker registry\n\n    faas-cli push -f pyfunc.yml\n\nMake the image public in DockerHub, to get OpenFaaS to fetch it.\n(TODO: have some privacy)\n\n### Deploy to OpenFaaS\n\n    faas-cli deploy --gateway=$OPENFAAS_URL -f pyfunc.yml\n\n### Test the function\n\n    curl -X POST \"${OPENFAAS_URL}/function/pyfunc\" -d \"💣\"\n\n### Check the UIs\n\n    open $OPENFAAS_URL\n    nomad ui\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasyrjasalo%2Faws-nomad-openfaas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasyrjasalo%2Faws-nomad-openfaas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasyrjasalo%2Faws-nomad-openfaas/lists"}