An ambitious ember-cli-deploy plugin for serving Ember FastBoot Applications entirely from within AWS Lambda/API Gateway (assets and all!).
API Gateway now supports the handling binary payloads, which means an end-to-end fastboot hosting solution can now be achieved through API gateway and Lambda without the use of S3 for serving static files. This is what this addon aims to achieve.
ember install ember-cli-deploy
ember install ember-cli-deploy-build
ember install ember-cli-deploy-fastboot-api-lambda
// config/deploy.js
ENV['fastboot-api-lambda'] = {
accessKeyId: process.env.AWS_ACCESS_KEY_ID, // (Required) AWS accessKeyId (must have permission to deploy lambda functions)
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, // (Required) AWS secretAccessKey
lambdaFunction: 'my-ember-app', // (Required) Lambda functions name
region: 'us-east-1', // (Required) Region where lambda is deployed
fallbackPath: '/' // (optional) The route that will be attempted if the current route fails. i.e. doesn't exist, fails etc.
stringyExtensions: [ // (optional) The file extensions that will be treated as text and not binary. Defaults are shown. Any additional items will be concatenated to this list.
'html',
'css',
'js',
'json',
'xml',
'ico',
'txt',
'map'
],
validAssetPaths: [ // (optional) The assets paths that the lambda is explicitly allow serve. Defaults are shown. Any additional items will be concatenated to this list.
'/assets/',
'/robots.txt',
'/humans.txt',
'/crossdomain.xml',
'/sitemap.xml'
]
};
Create the lambda function
index.handler
.Create a custom role
. Give it a name and use the default policy document.128
.30 seconds
.Next
and then select Create function
.Create the API Gateway Proxy
New API
and give it a nameEdit
. Add */*
and click Save
./
, then click Actions => Create Method
. Select Any
.Any label
, choose Integration type lambda
, check the Use Lambda Proxy integration
checkbox, and finally select your lambda function's region and name./
, then click Actions => Create Resource
. Select Any
.Configure as proxy resource
, and select Enable API Gateway CORS
.Lambda Function Proxy
, and finally select your lambda function's region and name.Actions => Deploy API
. Select a new stage and give it the name fastboot
. Hit Deploy
. You will now see the Invoke URL
. This is where you site will be hosted.Ember Application
rootURL
must match the stage name you selected when creating the api gateway. Otherwise the link-to
helper wont work.// config/environment.js
var ENV = {
rootURL: '/fastboot/'
}
Configuration is done!
Is as simple as going:
ember deploy production --activate --verbose=true
Just a word of warning.. just because this architecture is possible, doesn't make it the optimal for all use-cases.Lambda functions suffer from a cold start delay, which can make response times unpredictable.
Feel free to make a pull request if you would like your site added to the list!
ember-cli-deploy-fastboot-lambda for providing the base upload logic.
For more information on using ember-cli, visit http://www.ember-cli.com/.
For more information on using ember-cli-deploy, visit https://github.com/ember-cli-deploy/ember-cli-deploy.
ember-fastboot-docker Dockerized Node.js server for running Ember FastBoot apps. Based on Ember FastBoot for AWS Elastic Beanstalk by @tomdale. Usage $ docker run \ --rm -it \ -p 8080:3000 \ -v $(p
ember-fastboot-app-tests This is an ember-cli addon that makes writing FastBoot tests for your Ember app easy and straightforward! It works by spinning up a local FastBoot server using ember-cli-fastb
ember-fastboot-addon-tests This is an ember-cli addon that makes testing your own addon for compatibility with FastBoot easy and straightforward! It works by using ember-cli-addon-tests to create a (t
Ember CLI 是一个 Ember.js 命令行工具,提供了由 broccoli 提供的快速的资源管道和项目结构。 Ember CLI 基于 Ember App Kit Project 目前已经废弃。 Assets Compilation Ember CLI asset compilation is based on broccoli. Broccoli has support for: Ha
s3-deploy for vue-cli CALL FOR CONTRIBUTORS If you'd like to participate in the development and maintenance of this plugin, please open a PR or an issue. Help is welcome.Thanks to all who have contrib
This repository is no longer maintained. As a replacement check out: https://github.com/sir-dunxalot/ember-tooltips Ember CLI Tooltipster An Ember CLI add-on that wraps Tooltipster into an ember compo