{"id":15541774,"url":"https://github.com/simonihmig/ember-cli-deploy-cloudformation","last_synced_at":"2025-04-23T17:09:19.259Z","repository":{"id":32463248,"uuid":"133998034","full_name":"simonihmig/ember-cli-deploy-cloudformation","owner":"simonihmig","description":"An Ember CLI Deploy plugin to create/update an AWS CloudFormation stack before deploying to it","archived":false,"fork":false,"pushed_at":"2023-04-20T14:39:41.000Z","size":2516,"stargazers_count":6,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T17:09:12.118Z","etag":null,"topics":["aws","aws-cloudformation","ember","ember-addon","ember-cli-deploy","ember-cli-deploy-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonihmig.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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-18T19:53:31.000Z","updated_at":"2022-08-17T12:25:42.000Z","dependencies_parsed_at":"2024-10-20T13:48:57.297Z","dependency_job_id":null,"html_url":"https://github.com/simonihmig/ember-cli-deploy-cloudformation","commit_stats":null,"previous_names":["kaliber5/ember-cli-deploy-cloudformation"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonihmig%2Fember-cli-deploy-cloudformation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonihmig%2Fember-cli-deploy-cloudformation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonihmig%2Fember-cli-deploy-cloudformation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonihmig%2Fember-cli-deploy-cloudformation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonihmig","download_url":"https://codeload.github.com/simonihmig/ember-cli-deploy-cloudformation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250477813,"owners_count":21437049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","aws-cloudformation","ember","ember-addon","ember-cli-deploy","ember-cli-deploy-plugin"],"created_at":"2024-10-02T12:19:34.688Z","updated_at":"2025-04-23T17:09:19.242Z","avatar_url":"https://github.com/simonihmig.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-cli-deploy-cloudformation\n\n[![Build Status](https://github.com/kaliber5/ember-cli-deploy-cloudformation/workflows/CI/badge.svg)](https://github.com/kaliber5/ember-cli-deploy-cloudformation/actions)\n[![Ember Observer Score](https://emberobserver.com/badges/ember-cli-deploy-cloudformation.svg)](https://emberobserver.com/addons/ember-cli-deploy-cloudformation)\n[![npm version](https://badge.fury.io/js/ember-cli-deploy-cloudformation.svg)](https://badge.fury.io/js/ember-cli-deploy-cloudformation)\n\n\u003e An Ember CLI Deploy plugin to create/update an AWS CloudFormation stack before deploying to it\n\n## Introduction\n\n### What is CloudFormation?\n\n[AWS CloudFormation][9] is Amazon's implementation of [infrastructure as code][6], which lets you create, update, provision\nand delete stacks of AWS resources (e.g. EC2 instances, S3 buckets, CloudFront distributions etc.), described by a single \nconfiguration file.\n\nFor details on how CloudFormation works and how to write a template file, please visit the official\n[CloudFormation Documentation][7]. Also check the [Examples section](#examples) for some example configurations for\ncommon Ember deployment scenarios.\n\n### What does this plugin do?\n\nThis is an Ember CLI addon that adds a plugin to the [Ember CLI Deploy][8] pipeline to create or update a CloudFormation\nstack as part of the Ember CLI Deploy pipeline. It does not actually deploy any artefacts itself, this is where any of\nthe existing plugins that work with AWS resources come into play. Here are some that should work just fine:  \n\n* [`ember-cli-deploy-s3`](https://github.com/ember-cli-deploy/ember-cli-deploy-s3)\n* [`ember-cli-deploy-s3-index`](https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index)\n* [`ember-cli-deploy-s3-pack`](https://github.com/Gaurav0/ember-cli-deploy-s3-pack)\n* [`ember-cli-deploy-cloudfront`](https://github.com/kpfefferle/ember-cli-deploy-cloudfront)\n* [`ember-cli-deploy-elastic-beanstalk`](https://github.com/tomdale/ember-cli-deploy-elastic-beanstalk)\n* [`ember-cli-deploy-fastboot-app-server-aws`](https://github.com/ember-cli-deploy/ember-cli-deploy-fastboot-app-server-aws)\n\nThis allows you to create the AWS resources and deploy your app to them in one single `ember deploy` command. \nFor example you could easily deploy a feature branch to a new staging environment just for this feature and delete it \nafterwards, without any manual setup work.\n\n### Why not use the AWS CLI directly?\n\nThe AWS CLI allows you to interact with CloudFormation, but suffers from a few caveats when integrating it into a\nCI/CD pipeline:\n\n* on the first run of the pipeline you need to create the stack, while you need to update it for all following\ndeployments.\n* an update run without any changes to the stack is treated as an error by the CLI.\n* there is no easy way to pass the outputs of the template (e.g. the name of a created S3 bucket) to any following\ndeployment steps.\n\n## Installation\n\nRun the following command in your terminal:\n\n```bash\nember install ember-cli-deploy-cloudformation\n```\n\n## Examples\n\nEmber is about shared solutions to common problems. And this applies here as well. Instead of figuring all the details\nof a useful CloudFormation stack, this section will feature a few examples to get you going quickly:\n\n* [S3 + CloudFront](examples/S3+CloudFront)\nWith a custom domain name (self hosted) and SSL\n\n*This section is still a work in progess. If you have some templates you can share, please submit a PR so others can\nbenefit from your experience as well!*\n\n## Configuration \n\nThe configuration of this plugin takes place in three steps:\n\n### 1. Create a CloudFormation template\n\nCreate a CloudFormation template, that defines all the AWS resources in your stack. Consult the \n[CloudFormation documentation][3] for more information.\n\nUsually you will want to put this file under version control, so you can create it in your app's root folder as e.g.\n`cfn.yaml`, `git add cfn-yaml`, and reference it in the plugin configuration as \n[`templateBody: 'file://cfn.yaml`](#templateBody).\n\n### 2. Configure the plugin\n\nAdd the required configuration to your `config/deploy.js`.\n\nSee [Configuration Options](#configuration-options) below for all available configuration options. \nFor detailed information on how configuration of plugins works, please refer to the [Plugin Documentation][1].\n\n#### Example\n\nHere is an example of a configuration. It uses environment variables to inject all parameters that are variable:\n\n```js\n{\n  cloudformation: {\n    accessKeyId: process.env.AWS_ACCESS_KEY_ID,\n    secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,\n    region: 'eu-central-1',\n    templateBody: 'file://cfn.yaml',\n    capabilities: ['CAPABILITY_IAM'],\n    parameters: {\n      DomainName: process.env.CFN_DOMAINNAME,\n      Certificate: process.env.CFN_CERTIFICATE,\n      HostedZoneId: process.env.CFN_HOSTEDZONEID\n    }\n  }\n}\n```\n\n### 3. Pipe outputs to other plugins\n\nA CloudFormation template let's you define so called \"Outputs\". These are commonly values, which were not available before \ncreating the stack. So for example these could be some resource properties, like the name of an S3 bucket created by \nCloudFormation or the URL of a CloudFront distribution. \n\nSome of these you will have to pass to other Ember CLI Deploy plugins, so they can actually deploy your app to the\ninfrastructure that CloudFormation has created for you. A common example would be to pass the S3 bucket to \n`ember-cli-deploy-s3`.\n\nThis plugin will write all outputs of the processed template to the [Ember CLI Deploy context][4], at the path\n`cloudformation.outputs` as simple hash with the name of the output as the key. As Ember CLI Deploy allow you to \nconfigure plugins not only with static values, but also with functions that receive the context, you can easily\npass the outputs to any other plugin. Here the afore-mentioned S3 plugin will receive the name of the bucket, that was\ndefined in the CloudFormation template output as `AssetsBucket`:\n\n```js\n{\n  cloudformation: {\n    ...\n  },\n  s3: {\n    accessKeyId: process.env.AWS_ACCESS_KEY_ID,\n    secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,\n    bucket(context) {\n      return context.cloudformation.outputs.AssetsBucket;\n    },\n    region: 'eu-central-1'\n  }\n}\n```\n\n### Configuration Options\n\n#### accessKeyId\n\nThe AWS access key for the user that has the ability to work with CloudFormation. If this is left undefined,\nthe normal [AWS SDK credential resolution][5] will take place.\n\n*Default:* `undefined`\n\n#### secretAccessKey\n\nThe AWS secret for the user that has the ability to work with CloudFormation. This must be defined when `accessKeyId` is defined.\n\n*Default:* `undefined`\n\n#### profile\n\nThe AWS profile as definied in `~/.aws/credentials`. If this is left undefined,\nthe normal [AWS SDK credential resolution][5] will take place.\n\n*Default:* `undefined`\n\n#### region\n\nThe region to create the CloudFormation stack in.\n\n*Default:* `undefined`\n\n\u003chr\u003e\n\nMoreover all parameters supported by the AWS CloudFormation SDK will be passed when creating/updating the stack. See the\n[AWS SDK docs][3] for a complete reference.\n\n\u003e Note: the plugin will let you write parameters in the more usual camelcase style, and map them to the pascal case \nstyle that AWS expects. So instead of writing `StackName`, you can use `stackName`. Also for the `tags` and `parameters`\nproperties, specify them as normal JavaScript hashes (e.g. `tags: { key: 'value' }`) instead of the original AWS syntax! \n\nHere is a list of the commonly used CloudFormation parameters:\n\n#### stackName\n\nThe name of the CLoudFormation stack.\n\n*Default:* `\u003cappName\u003e-\u003cdeployTarget\u003e`, e.g. `myApp-production`\n\n#### templateBody\n\nThe CloudFormation template body as a string (JSON or YAML). Instead of inlining your template, the `file://` protocol \nis also supported to reference a template file on disk, e.g. `file://path/to/cfn.yaml` (relative to your app's root folder)\n\nEither `templateBody` or `templateURL` is **required**!\n\n*Default:* `undefined`\n\n#### templateURL\n\nThe location of a CloudFormation template (JSON or YAML). The URL must point to a template that is located in an Amazon S3 bucket.\n\nEither `templateBody` or `templateURL` is **required**!\n\n*Default:* `undefined`\n\n#### capabilities\n\nAn array of required capabilites, e.g. `['CAPABILITY_IAM']` for working with IAM roles, user, policies etc.\n\n*Default:* `undefined`\n\n#### parameters\n\nA hash of input parameters as expected by your CloudFormation template. \n\n*Note: specify them as normal JavaScript hashes (e.g. `parameters: { name: 'value' }`) instead of the unusual AWS syntax!*\n\n```js\nparameters: {\n  Domain: 'example.com'\n}\n```\n\n*Default:* `undefined`\n\n\n[1]: http://ember-cli-deploy.com/plugins/ \"Plugin Documentation\"\n[2]: https://aws.amazon.com/documentation/cloudformation/ \"AWS CloudFormation Documentation\"\n[3]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudFormation.html#createStack-property \"AWS parameters\"\n[4]: http://ember-cli-deploy.com/docs/v1.0.x/the-deployment-context/ \"Ember CLI Deploy context\"\n[5]: https://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html#Setting_AWS_Credentials \"Setting AWS Credentials\"\n[6]: https://en.wikipedia.org/wiki/Infrastructure_as_Code\n[7]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html\n[8]: http://ember-cli-deploy.com/\n[9]: https://aws.amazon.com/cloudformation/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonihmig%2Fember-cli-deploy-cloudformation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonihmig%2Fember-cli-deploy-cloudformation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonihmig%2Fember-cli-deploy-cloudformation/lists"}