{"id":17134360,"url":"https://github.com/brianium/cloudformation-starter","last_synced_at":"2026-02-15T04:36:01.213Z","repository":{"id":146514851,"uuid":"224018672","full_name":"brianium/cloudformation-starter","owner":"brianium","description":"A fairly rad starting point for leveraging AWS CloudFormation via Make","archived":false,"fork":false,"pushed_at":"2019-12-05T23:07:14.000Z","size":9,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T04:29:58.135Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/brianium.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,"zenodo":null}},"created_at":"2019-11-25T18:50:33.000Z","updated_at":"2019-12-05T23:07:16.000Z","dependencies_parsed_at":"2023-04-28T22:02:26.541Z","dependency_job_id":null,"html_url":"https://github.com/brianium/cloudformation-starter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brianium/cloudformation-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fcloudformation-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fcloudformation-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fcloudformation-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fcloudformation-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brianium","download_url":"https://codeload.github.com/brianium/cloudformation-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Fcloudformation-starter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29469617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T04:35:06.950Z","status":"ssl_error","status_checked_at":"2026-02-15T04:33:41.357Z","response_time":118,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-14T19:44:42.193Z","updated_at":"2026-02-15T04:36:01.196Z","avatar_url":"https://github.com/brianium.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloudformation-starter\n\nA lightweight template for using Make to manage infrastructure as code via Make.\n\nAttempts to let Make do what Make does best, and let other tools do their jobs as simply as possible.\n\n## Why?\n\n* A solid Make setup is super flexible!\n* You can add and extend things all day every day!\n* Raw CloudFormation (yaml) works out of the box with the AWS cli\n* You can usually acheive things in yaml before you can with the [cdk](https://docs.aws.amazon.com/cdk/latest/guide/home.html)\n* It's my preference! (for now)\n\n## Usage\n\nClone this guy as a start to a new project. The end goal is to be able to run this to acheive a radical infrastructure on AWS.\n\n```\n$ make\n```\n\nJust tweak your configuration and let er rip!\n\n## Makefile\n\nThe included Makefile is broken up into two files:\n\n* Makefile\n* config.mk\n\nThe `config.mk` file contains variables, macros, and functions. It is mostly data. The `Makefile` file contains some dynamic and fixed targets that are useful for getting started.\n\n## Config\n\nThe `config.mk` file is where we assign values to variables for use in the `Makefile`. It also contains macros and functions. Some areas of note:\n\n### Executables\n\nThe `EXECUTABLES` variable contains a list of executables required within the environment executing `make`. If your process requires a command line program, put it here. Out of the box it looks like this:\n\n`EXECUTABLES = jq aws`\n\nThis requires [jq](https://stedolan.github.io/jq/) for JSON processing and of course the [aws cli](https://aws.amazon.com/cli/).\n\n### AWS Config\n\nThese variables require values required for the aws cli to do it's job properly.\n\n```\naws_region ?= us-east-2\naws_profile ?= default\naws_account_id ?= 123456789101112\naws_build_bucket ?= build-iehib5fu\nstack_prefix ?= myapp\n```\n\n#### aws_build_bucket\n\nIt is possible to create a bucket without a name via CloudFormation. The `bootstrap` target will create a bucket with this name. Supplying a name allows the `package` macro to use the bucket without having to query CloudFormation stack outputs. The name doesn't matter a ton - just as long as you can find it later should you need to. Can effectively be a set and forget value.\n\n### stack_prefix\n\nThis value should/will be applied to all stacks created via the `Makefile`. This ensures a relative consistency in stacks created via this method - i.e `myapp-application`, `myapp-bootstrap`, etc..\n\n### Application Settings\n\nThese variables are used for specific application needs. This list can and should grow as your application does.\n\n```\nenvironment ?= staging\nsecurity_group_ids ?= sg-12345\nsubnet_ids ?= subnet-1234,subnet-5678\n```\n\n### Git and Github\n\nThese variables handle configuring AWS to integrate cleanly with GitHub and Git based workflows.\n\n```\ngithub_owner ?= myorgoruser\ngithub_repo ?= myrepo\ngithub_branch ?= master\ngithub_develop_branch ?= develop\ngithub_token_parameter ?= /path/to/github_token\nversion_type ?= patch\n```\n\n#### github_token_parameter\n\nMost AWS services require a GitHub token to create webhooks, pull source, etcc.. This variable should\ncontain a parameter name pointing to a parameter in [SSM](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html). This value will be looked up using the aws cli. The `--with-decryption` flag is used, so store that parameter as a `SecureString`. This value will be placed in a variable called `github_token`.\n\n#### version_type\n\nThis isn't directly used in the starter, but is useful for defining the type of version being released in a Git based workflow.\n\n\n## Targets\n\nTargets are executed when using Make using the form\n\n```\n$ make target-name\n```\n\n### Dynamic Targets\n\nDynamic targets take advantage of Make placeholders - a.k.a `%`\n\n#### out/%.output.yaml\n\nThis really just expands the `package` macro in order to call `aws cloudformation package` in a super flexible way. \n\n**Usage**:\n\n```\n$ make out/application.output.yaml\n```\n\nThis will package the yaml file located at `infrastructure/src/cloudformation/application.yaml`. This works for all files located in `infrastructure/src/cloudformation/` - just replace `application` with the file that needs to be packaged.\n\n\n#### validate-%:\n\n**Usage:**\n\n```\n$ make validate-application\n```\n\nThis runs `aws cloudformation validate-template` on the yaml file identified by the placeholder `%`. In the example above, this would be `application.yaml`.\n\n### Fixed Targets\n\nThe default `all` target looks like this:\n\n```\nall: clean bootstrap application automation\n```\n\nThis is run when simply executing `make`, and is used to create an entire system on AWS.\n\n#### bootstrap\n\nCreates foundational resources. This should for the most part just be the bucket identified by `$(aws_build_bucket)`. This bucket is a requirement for packaged templates and builds done in the `automation` target.\n\n#### application\n\nThis should be resources relevant to your working application. It can and should orchestrate different services and resources to make your application SHINE.\n\n#### automation\n\nHandles CI/CD via [CodeBuild](https://aws.amazon.com/codebuild/) and [CodePipeline](https://aws.amazon.com/codepipeline/).\n\nOut of the box this includes a production build for building a change set to production, a test build that executes unit tests for pull requests against the `$(github_develop_branch)`, and a pipeline to organize steps in a production release.\n\nBuildspecs used by codebuild fit neatly into the `infrastructure/src/buildspecs` directory.\n\n## Go forth!\n\nThis is just a starting point using tried and true tools. It should be able to grow and change as needed.\n\n### Nested stacks\n\nAs needs grow, and things become more complex - [nested stacks](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) can be a useful tool for organizing the `application` and `automation` layers. `application.yaml` and `automation.yaml` can just be composed of nested stacks, while `application/` and `automation/` directories can contain nested stacks.\n\nPerhaps using a directory structure like this:\n\n```\napplication.yaml\napplication/\n-- database.yaml\n-- api.yaml\nautomation.yaml\nautomation/\n-- code-builds.yaml\n-- sns-topics.yaml\nbootstrap.yaml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianium%2Fcloudformation-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianium%2Fcloudformation-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianium%2Fcloudformation-starter/lists"}