Skip to content

Commit aa611aa

Browse files
authored
Merge pull request #720 from awslabs/develop
Release: 0.6.1 Release
2 parents ceeb8db + 0c8488e commit aa611aa

File tree

79 files changed

+1488
-217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1488
-217
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ python:
66
- "2.7"
77
- "3.6"
88

9+
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
10+
matrix:
11+
include:
12+
- python: 3.7
13+
dist: xenial
14+
sudo: true
15+
916
install:
1017
# Install the code requirements
1118
- make init

DEVELOPMENT_GUIDE.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Environment Setup
1414

1515
1. Install Python Versions
1616
~~~~~~~~~~~~~~~~~~~~~~~~~~
17-
We support both Python 2.7 and 3.6 versions.
17+
We support Python 2.7, 3.6 and 3.7 versions.
1818
Follow the idioms from this `excellent cheatsheet`_ to make sure your code is compatible with both Python versions.
1919
Our CI/CD pipeline is setup to run unit tests against both Python versions. So make sure you test it with both
2020
versions before sending a Pull Request. `pyenv`_ is a great tool to easily setup multiple Python versions.
@@ -24,16 +24,19 @@ versions before sending a Pull Request. `pyenv`_ is a great tool to easily setup
2424
#. Install PyEnv - ``curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash``
2525
#. ``pyenv install 2.7.14``
2626
#. ``pyenv install 3.6.4``
27-
#. Make both Python versions available in the project: ``pyenv local 3.6.4 2.7.14``
27+
#. ``pyenv install 3.7.0``
28+
#. Make Python versions available in the project: ``pyenv local 3.6.4 2.7.14 3.7.0``
2829

2930

3031
2. Activate Virtualenv
3132
~~~~~~~~~~~~~~~~~~~~~~
3233
Virtualenv allows you to install required libraries outside of the Python installation. A good practice is to setup
3334
a different virtualenv for each project. `pyenv`_ comes with a handy plugin that can create virtualenv.
3435

35-
#. Create new virtualenv if it does not exist: ``pyenv virtualenv 2.7.14 samcli27`` and ``pyenv virtualenv 3.6.4 samcli36``
36-
#. ``pyenv activate samcli27`` for Python2.7 or ``pyenv activate samcli36`` for Python3.6
36+
Depending on the python version, the following commands would change to be the appropriate python version.
37+
38+
#. ``pyenv virtualenv 3.7.0 samcli37``
39+
#. ``pyenv activate samcli37`` for Python3.7
3740

3841

3942
3. Install dev version of SAM CLI
@@ -42,7 +45,7 @@ We will install a development version of SAM CLI from source into the virtualenv
4245
make changes. We will install in a command called ``samdev`` to keep it separate from a global SAM CLI installation,
4346
if any.
4447

45-
#. Activate Virtualenv: ``pyenv activate samcli27`` or ``pyenv activate samcli36``
48+
#. Activate Virtualenv: ``pyenv activate samcli37``
4649
#. Install dev CLI: ``make init``
4750
#. Make sure installation succeeded: ``which samdev``
4851

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Get Started
4545

4646
Learn how to get started using the SAM CLI with these guides:
4747

48-
- `Installation <docs/installation.rst>`__: Set up your MacOs, Linux or Windows Machine to run serverless projects with SAM CLI.
48+
- `Installation <docs/installation.rst>`__: Set up your macOS, Linux or Windows Machine to run serverless projects with SAM CLI.
4949
- `Introduction to SAM and SAM CLI <docs/getting_started.rst>`__ What is SAM and SAM CLI, and how can you use it to make a simple hello-world app.
5050
- `Running and debugging serverless applications locally <docs/usage.rst>`__: Describes how to use SAM CLI for invoking Lambda functions locally, running automated tests, fetching logs, and debugging applications
5151
- `Packaging and deploying your application <docs/deploying_serverless_applications.rst>`__: Deploy your local application using an S3 bucket, and AWS CloudFormation.

docs/deploying_serverless_applications.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Next, open a command prompt and type the following:
2323
2424
sam package \
2525
--template-file path/template.yaml \
26-
--output-template-file packaged.yaml \
26+
--output-template-file serverless-output.yaml \
2727
--s3-bucket s3-bucket-name
2828
2929
The package command returns an AWS SAM template named serverless-output.yaml that contains the CodeUri that points to the deployment zip in the Amazon S3 bucket that you specified. This template represents your serverless application. You are now ready to deploy it.
@@ -36,7 +36,7 @@ To deploy the application, run the following command:
3636
.. code:: bash
3737
3838
sam deploy \
39-
--template-file serverless-template.yaml \
39+
--template-file serverless-output.yaml \
4040
--stack-name new-stack-name \
4141
--capabilities CAPABILITY_IAM
4242

docs/installation.rst

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@ environment variable to contact the docker daemon.
1818
- **Windows**: `Docker
1919
For Windows (create an account & follow through to download from the Docker Store) <https://www.docker.com/docker-windows>`__
2020
- **Linux**: Check your distro’s package manager (e.g. yum install docker)
21-
21+
*** for Centos 7.5 System requirements are::
22+
yum install gcc zip py-pip py-setuptools ca-certificates groff python-dev g++ make docker epel-release python-pip python-devel\
23+
python-tools
24+
**run post install of above**
25+
pip install --upgrade pip
26+
pip install --upgrade setuptools
27+
pip install --upgrade aws-sam-cli
28+
*** if you want to use the lambda-local option(without running it as root) you will need to add your user to the docker group ***
29+
usermod -a -G Docker yourUserName
30+
2231
**Note for macOS and Windows users**: SAM CLI requires that the project directory
2332
(or any parent directory) is listed in `Docker file sharing options <https://docs.docker.com/docker-for-mac/osxfs/>`__.
2433

@@ -176,6 +185,31 @@ Install with PyEnv
176185
# Verify your installation worked
177186
$ sam –-version
178187
188+
Updating SAM CLI on AWS Cloud9
189+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
190+
191+
If your AWS Cloud9 environment has a SAM CLI version < 0.3.0 installed there are a few extra steps you must do to upgrade to newer versions:
192+
193+
.. code:: bash
194+
195+
# Uninstall the older version of SAM Local
196+
$ npm uninstall -g aws-sam-local
197+
198+
# Remove the symlink
199+
$ rm -rf $(which sam)
200+
201+
# Install the CLI
202+
$ pip install --user aws-sam-cli
203+
204+
# Create new symlink
205+
$ ln -sf $(which sam) ~/.c9/bin/sam
206+
207+
# Reset the bash cache
208+
$ hash -r
209+
210+
# Verify your installation worked
211+
$ sam –-version
212+
179213
Troubleshooting
180214
---------------
181215

0 commit comments

Comments
 (0)