AWS Serverless Application Model (AWS SAM) prescribes rules for expressing Serverless applications on AWS.
Clone or download
brettstack refactor: add support for Python 3 (#490) (#491)
* feat: add support for Python 3 (#428)

* refactor: Updated imports to by Py3 compliant

* refactor: Move class variable creation to constructor in globals.py

Without moving this to the __init__, the globals.py file will not run
in Py3 because it can't reference the constants.

* refactor: Update update_policy.py to be Py3 compliant

In Py3, the function .iteritems() on a dict was removed and replaced
with .items().

* refactor: Update deployment_preference_collection.py to be Py3 compliant

In Py3, .itervalues() and .iteritems() was replaced with .values() and
.items(), respectfully.

* refactor: Update swagger.py to be Py3 compliant

In Py3, the .keys() method on a dictionary returns a dict_keys object
that is a view into the dictionary. In Py2, it returns a list. To
support Py3, we need to convert the .keys() to a list.

* refactor: Update intrinsics.py to be Py3 compliant

In Py3, the .keys() method on a dictionary returns a dict_keys object
that is a view into the dictionary. In Py2, it returns a list. To
support Py3, we need to convert the .keys() to a list.

* Staging translator.py changes

Updated .iteritems() to items()

* refactor: More updating to be Py3 compliant

* refactor: Make hashing constisent between py2 and py3

* refactor: Make exceptions sortable to allow error case tests to pass in Py3

* fix: add support for Python 3 (#445)

* refactor: Updated imports to by Py3 compliant

* refactor: Move class variable creation to constructor in globals.py

Without moving this to the __init__, the globals.py file will not run
in Py3 because it can't reference the constants.

* refactor: Update update_policy.py to be Py3 compliant

In Py3, the function .iteritems() on a dict was removed and replaced
with .items().

* refactor: Update deployment_preference_collection.py to be Py3 compliant

In Py3, .itervalues() and .iteritems() was replaced with .values() and
.items(), respectfully.

* refactor: Update swagger.py to be Py3 compliant

In Py3, the .keys() method on a dictionary returns a dict_keys object
that is a view into the dictionary. In Py2, it returns a list. To
support Py3, we need to convert the .keys() to a list.

* refactor: Update intrinsics.py to be Py3 compliant

In Py3, the .keys() method on a dictionary returns a dict_keys object
that is a view into the dictionary. In Py2, it returns a list. To
support Py3, we need to convert the .keys() to a list.

* Staging translator.py changes

Updated .iteritems() to items()

* refactor: More updating to be Py3 compliant

* refactor: Make hashing constisent between py2 and py3

* refactor: Make exceptions sortable to allow error case tests to pass in Py3

* feat: Run tox from Travis-CI

* feat: Update tox to run in Py2 and Py3

* refactor: Force sorting behavior to be Py2 compatible and update Deployment logicalid hash

* fix: Update tox to run tests against Py27 and Py36

* Update Travis config to run Py2 and Py3 tests in parallel

* Setting region env var in tox file for Travis to pick up

* Set AWS region in travis file

* Pass AWS_* env vars to tox

* Fixing ordering of resource types in Globals error message

* Py2/3 compatible implementation of string encoding for logicalId generator

Also added lots of comments explaining why/how the deep sorting of lists
work in unit tests

* Removing redundant usage of bytes
Latest commit e8f74f5 Jun 28, 2018
Permalink
Failed to load latest commit information.
.github Adding dotfiles for Travis, Flake, Coverage and Pylint (#359) Apr 4, 2018
bin feat(cli): add lightweight transformer cli (#459) Jun 7, 2018
docs chore: merge pull request #486 from awslabs/master Jun 28, 2018
examples chore: merge pull request #486 from awslabs/master Jun 28, 2018
requirements feat(cli): add lightweight transformer cli (#459) Jun 7, 2018
samtranslator refactor: add support for Python 3 (#490) (#491) Jun 28, 2018
tests refactor: add support for Python 3 (#490) (#491) Jun 28, 2018
versions docs: remove reference to InlineCode which is unreleased Jun 28, 2018
.coveragerc Adding dotfiles for Travis, Flake, Coverage and Pylint (#359) Apr 4, 2018
.flake8 Adding dotfiles for Travis, Flake, Coverage and Pylint (#359) Apr 4, 2018
.gitignore release: 1.5.1 (#391) Apr 18, 2018
.pylintrc Adding dotfiles for Travis, Flake, Coverage and Pylint (#359) Apr 4, 2018
.travis.yml refactor: add support for Python 3 (#490) (#491) Jun 28, 2018
CODE_OF_CONDUCT.md Adding standard files (#338) Mar 22, 2018
CONTRIBUTING.md docs: add validation on make setup target (#375) Apr 17, 2018
DESIGN.md doc: update DESIGN.md to include an Overview and entry point for SAM (#… May 25, 2018
DEVELOPMENT_GUIDE.rst feat(cli): add lightweight transformer cli (#459) Jun 7, 2018
HOWTO.md docs: add syntax highlighting to HOWTO.md (#204) Oct 7, 2017
LICENSE Initial commit Oct 10, 2016
MANIFEST.in Update packaging configuration in setup.py and MANIFEST.in (#394) Apr 25, 2018
Makefile release: update setup.py (#381) Apr 18, 2018
NOTICE 🥁 SAM Translator Implementation is now open source! (#356) Apr 4, 2018
README.md docs: add Travis and PyPi badges to README (#392) Apr 20, 2018
aws_sam_introduction.png adding AWS SAM intro graphic (#117) Apr 5, 2017
pytest.ini 🥁 SAM Translator Implementation is now open source! (#356) Apr 4, 2018
setup.cfg Update packaging configuration in setup.py and MANIFEST.in (#394) Apr 25, 2018
setup.py Update packaging configuration in setup.py and MANIFEST.in (#394) Apr 25, 2018
tox.ini refactor: add support for Python 3 (#490) (#491) Jun 28, 2018

README.md

Build Status PyPI version

Logo

AWS Serverless Application Model (AWS SAM)

You can use SAM to define serverless applications in simple and clean syntax.

This GitHub project is the starting point for AWS SAM. It contains the SAM specification, the code that translates SAM templates into AWS CloudFormation stacks, general information about the model, and examples of common applications.

The SAM specification and implementation are open sourced under the Apache 2.0 license. The current version of the SAM specification is available at AWS SAM 2016-10-31.

Creating a serverless application using SAM

To create a serverless application using SAM, first, you create a SAM template: a JSON or YAML configuration file that describes your Lambda functions, API endpoints and the other resources in your application. Then, you test, upload, and deploy your application using the SAM Local CLI. During deployment, SAM automatically translates your application’s specification into CloudFormation syntax, filling in default values for any unspecified properties and determining the appropriate mappings and invocation permissions to setup for any Lambda functions.

Read the How-To Guide and see examples to learn how to define & deploy serverless applications using SAM.

Contributing new features and enhancements to SAM

You can build serverless applications faster and further simplify your development of serverless applications by defining new event sources, new resource types, and new parameters within SAM. Additionally, you can modify SAM to integrate it with other frameworks and deployment providers from the community for building serverless applications.

Read the Development Guide for in-depth information on how to start making changes.

Join the SAM developers channel (#samdev) on Slack to collaborate with fellow community members and the AWS SAM team.