Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serverless framework #2

Merged
merged 27 commits into from
Oct 10, 2017
Merged

Serverless framework #2

merged 27 commits into from
Oct 10, 2017

Conversation

rts-rob
Copy link
Contributor

@rts-rob rts-rob commented Sep 8, 2017

Added support for the serverless framework.

Modularized the engines and moved under the "engines" directory. This required the use of browserify.

Added a line to the README.md highlighting the need to "re-browserify" after any modifications.

NB: Anything that was left as "TODO" in the SAM engine has been left as TODO in this PR. The target was feature parity.

Rob Sutter and others added 12 commits September 6, 2017 12:38
Corrected handler from "hello" to "handler" in both nodejs6.10 and python3.6 startingCode
… differently in the Serverless Framework (whereas other resources are similarly listed under "Resources")
…g form equivalents (Ref:, Fn::GetAtt, Fn::Sub) for Serverless Framework compatibility.
…conflicting variable name conventions) to use the Fn::Join syntax.
@alexcasalboni
Copy link
Collaborator

@rts-rob it looks like most of the CloudFormation code is duplicated around, am I right?

@rts-rob
Copy link
Contributor Author

rts-rob commented Sep 10, 2017

@alexcasalboni quite a bit is close but not exactly duplicated. This is something I would want to refactor after finishing the terraform engine.

SAM and serverless place some things a little bit differently. SAM wants everything in the "Resources" section (capital R) while serverless splits some things between Resources (resources to be created) and functions.

Some simplification can come from dropping the short form functions in the SAM engine (!GetAtt) in favor of the long form (Fn::GetAtt) which is the only version serverless seems to support.

@alexcasalboni
Copy link
Collaborator

Yeah, ideally I'd try to create a generic set of prototypes/classes that generate CloudFormation code, which we can then specialize for the various frameworks/outputs.

I'm ok for duplicating some of the logic for now.

Fix cognito-identity.amazonaws.com:aud !Ref
Rob Sutter and others added 12 commits September 11, 2017 19:34
Corrected handler from "hello" to "handler" in both nodejs6.10 and python3.6 startingCode
… differently in the Serverless Framework (whereas other resources are similarly listed under "Resources")
…g form equivalents (Ref:, Fn::GetAtt, Fn::Sub) for Serverless Framework compatibility.
…conflicting variable name conventions) to use the Fn::Join syntax.
@alexdebrie
Copy link

This is awesome! Thanks for doing the work on this, @rts-rob.

@danilop Anything needed on your end to merge it in?

@danilop danilop merged commit efe4d6b into danilop:master Oct 10, 2017
@danilop
Copy link
Owner

danilop commented Oct 10, 2017

Now that there are 2 engines, it is clear we need some refactoring to avoid code duplication. I am also planning to bring the sample Lambda functions out of the engines (they don't depend on the engine, it was a bad design decision from the beginning).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants