A sample template for bootstrapping Dart Runtime for AWS Lambda applications with ⚡ serverless framework ⚡.
Install the serverless framework CLI.
Run the following command in your terminal.
$ npx serverless install \
--url https://github.com/katallaxie/serverless-aws-dart \
--name hello
This will download the source of a sample Dart application and unpack it as a new service named "hello" in a directory called "hello" 👋.
This template includes an example GitHub actions configuration file which can unlock a virtuous cycle of continuous integration and deployment ( i.e all tests are run on prs and every push to master results in a deployment).
GitHub actions is managed simply by the presence of a file checked into your repository. To set up GitHub Actions to deploy to AWS you'll need to do a few things
Firstly, version control your source. Github is free for opensource.
$ git init
$ git remote add origin git@github.com:{username}/hello.git
Store a AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
used for aws deployment in your repositories secrets https://github.com/{username}/hello/settings/secrets
Add your changes to git and push them to GitHub.
Finally, open https://github.com/{username}/hello/actions in your browser and grab a bucket of popcorn 🍿.
Good code should be easily replaceable. Good code should also be easily disposable. Retiring applications should be as easy as creating and deploying them them. The dual of serverless deploy
is serverless remove
. Use this for retiring services and cleaning up resources.
$ npx serverless remove
-
See the serverless-dart plugin's documentation for more information on plugin usage.
-
See the Dart Runtime for AWS Lambda for more information on writing Dart Lambda functions