• Stars
    star
    283
  • Rank 140,664 (Top 3 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Serverless Golang deploy tool and framework for AWS Lambda

Aegis

License Apache 2 godoc aegis Build Status Go Report Card

Aegis Documentation

Aegis is both a simple deploy tool and framework. Its primary goal is to help you write microservices in the AWS cloud quickly and easily. They are mutually exclusive tools.

Aegis is not intended to be an infrastructure management tool. It will never be as feature rich as tools like Terraform. Its goal is to assist in the development of microservices - not the maintenance of infrastructure.

Likewise the framework is rather lightweight as well. It may never have helpers and features for every AWS product under the sun. It provides a conventional framework to help you build serverless microservices faster. It removes a lot of boilerplate.

Getting Started

You'll need an AWS account of course. You'll also want to have your credentials setup as you would for using AWS CLI. Note that you can also pass AWS credentials via the CLI or by setting environment variables.

Get Aegis of course. Use the normal go get github.com/tmaiaroto/aegis. Ensure the aegis binary is in your executable path. You can build a fresh copy from the code in this repository or download the binary from the releases section of the GitHub project site. If you want to use the framework though, you'll need to use go get anyway.

You can find some examples in the examples directory of this repo. Aegis also comes with a command to setup some boilerplate code in a clean directory using aegis init. Note that it will not overwrite any existing files.

Work with your code and check settings in aegis.yaml. When you're ready, you can deploy with aegis deploy to upload your Lambda and setup some resources.

Aegis' deploy command will set up the Lambda function, an optional API Gateway, IAM roles, CloudWatch event rules, and other various triggers and permissions for your Lambda function. You're able to choose a specific IAM role if you like too. Just set it in aegis.yaml.

If you're deploying an API, the CLI output will show you the URL for it along with other helpful information.

The Aegis framework works by handling events (how anything using AWS Lambda works). The way in which it does this though is via "routers." This means your Lambda is actually able to handle multiple types of events if you so choose.

Many people will want to write one handler for one Lambda, but that's not a mandate of Lambda. So feel free to architect your microservices how you like.

There are several types of routers. You can handle incoming HTTP requests via API Gateway using various HTTP methods and paths. You can handle incoming S3 events. You can handle scheduled Lambda invocations using CloudWatch rules. You can even handle invocations from other Lambdas ("RPCs").

Building

It's easiest to download a binary to use Aegis, though you may wish to build for your specific platform. In this case, Go Modules is used. Easiest thing to do after cloning is:

GO111MODULE=on go mod download

Then build:

GO111MODULE=on go build

Unfortunately you can't do a straight go build because of one of the packages used. You'll get errors. So using Go Modules is the way.

Contributing

Please feel free to contribute (see CONTRIBUTING.md). Though outside of actual pull requests with code, please file issues. If you notice something broken, speak up. If you have an idea for a feature, put it in an issue. Feedback is perhaps one of the best ways to contribute. So don't feel compelled to code.

Keep in mind that not all ideas can be implemented. There is a design direction for this project and only so much time. Though it's still good to share ideas.

Running Tests

Goconvey is used for testing, just be sure to exclude the docs directory. For example: goconvey -excludedDirs docs

Otherwise, tests will run and also include the docs folder which will likely have problems.

Alternatively, run tests from the framework directory.

More Repositories

1

hugo-redlounge

A Hugo theme
HTML
100
star
2

go-lambda-geoip

An example using AWS Lambda with Go
Go
85
star
3

node-docker-lambda

Bundles your AWS Lambda code into a Docker container to execute.
JavaScript
75
star
4

discfg

A distributed, serverless, configuration tool using AWS services
Go
75
star
5

minerva

Minerva CMS
PHP
57
star
6

li3_access

Li3 Access Library
PHP
54
star
7

osx-appjs-bootstrap

An AppJS Bootstrap Desktop Application for OS X
JavaScript
44
star
8

agile_uploader

Upload files, other form data, and optionally resize any uploaded images on the client side before uploading to save on server bandwidth. Resizing before uploading can also help save a server from processing unnecessarily large image files if further image processing (manipulation or simply having the server save multiple sizes) is done on the server.
ActionScript
28
star
9

li3_facebook

Lithium Library for the Facebook API
PHP
27
star
10

smartthings-unofficial-docs

Unofficial Documentation, Tips, and Notes
26
star
11

gridline

A flexible grid system for Twitter Bootstrap 3
HTML
26
star
12

li3_perf

Lithium PHP Framework performance and information toolbar
PHP
17
star
13

gopartman

Postgres partition manager "pg_partman" wrapped in a Go utility
Go
14
star
14

image_version

CakePHP ImageVersion Component and Helper
11
star
15

cycle

Croogo Cycle Plugin
JavaScript
7
star
16

telepathic-black-panther

Automatically track events in Google Analytics based on your web site's content and UI.
JavaScript
6
star
17

li3_orientdb

PHP
5
star
18

node_schema

A plugin for the CMS Croogo, built on the CakePHP framework. It allows you to extend the data stored on the node model.
PHP
5
star
19

li3_bootstrap

PHP
4
star
20

lithium-sandbox

Sandbox for screen casts, tutorials, sharing, collaborating, etc.
PHP
4
star
21

li3b_core

JavaScript
3
star
22

social-harvest-dashboard

A dashboard for Social Harvest, an open-source social media analytics platform.
JavaScript
3
star
23

gloauth

A serverless authentication system
Go
2
star
24

li3b_gallery

An image gallery built for Lithium Bootstrap, uses MongoDB.
PHP
2
star
25

minerva_blog

A blog plugin for the Minerva CMS
PHP
2
star
26

blackprint

An elegant, industrial strength, scalable, and open-source CMS for the masses.
PHP
2
star
27

li3b_users

A basic users library responsible for storing user documents in MongoDB and allowing users to authenticate against that data to login to the system. This library also comes with basic access rules via the li3_access library.
PHP
2
star
28

li3_liveconsole

1
star
29

lithium_composer

Everything you need to start building your own application using the Lithium framework and Composer
PHP
1
star
30

li3_angular_goodies

JavaScript
1
star
31

li3_metrics

This metrics library for the Lithium PHP framework records visitor page views and browser information.
PHP
1
star
32

li3b_blog

A blog plugin for Lithium Bootstrap.
PHP
1
star
33

li3_forum

A simple forum using Lithium and MongoDB.
1
star