-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
…) generated by the serverless framework.
…6.10 and python3.6 runtimes
Corrected handler from "hello" to "handler" in both nodejs6.10 and python3.6 startingCode
…erverless.yml (Serverless Framework)
…template.resources.Resources
… 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.
@rts-rob it looks like most of the CloudFormation code is duplicated around, am I right? |
@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. |
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
…) generated by the serverless framework.
…6.10 and python3.6 runtimes
Corrected handler from "hello" to "handler" in both nodejs6.10 and python3.6 startingCode
…erverless.yml (Serverless Framework)
…template.resources.Resources
… 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.
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). |
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.