Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup Instructions

AWS CLI

Having the AWS CLI (Command Line Interface) installed helps get the credentials set up locally for running shell commands to create resources inside of AWS. Follow the instructions from AWS' official documenation page to get it installed.

Serverless Info

A serverless version of this application has been established by leveraging the aws-serverless-express npm module. This module wraps an Express app so that it conforms to AWS Lambda handler method signatures and can be deployed into Lambda, yet it uses Express' router to route and deliver the requests to the appropriate controllers.

Running Locally

SAM-CLI Installation

See AWS' official documentation for the latest instructions for installing the SAM CLI. The abridged version is this:

  • Make sure python 2.7 is installed

    python --version

  • Update pip

    pip install --user --upgrade pip

  • Install aws-sam-cli

    pip install --user aws-sam-cli

  • Verify sam successfully installed

    sam --version

Issues Installing SAM-CLI

pip show -f aws-sam-cli

Should show where files were installed:

Name: aws-sam-cli
Version: 0.3.0
Summary: AWS SAM CLI is a CLI tool for local development and testing of Serverless applications
Home-page: https://github.com/awslabs/aws-sam-cli
Author: Amazon Web Services
Author-email: aws-sam-developers@amazon.com
License:                                  Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/
Location: /Users/rjensen/Library/Python/2.7/lib/python/site-packages
Requires: six, click, enum34, Flask, boto3, PyYAML, cookiecutter, aws-sam-translator, docker
Required-by:
Files:
  ../../../bin/sam
  aws_sam_cli-0.3.0-py2.7.egg-info
  aws_sam_cli-0.3.0-py2.7.egg-info/PKG-INFO
  aws_sam_cli-0.3.0-py2.7.egg-info/SOURCES.txt

The "../../../bin/sam" entry (will be different depending on what directory you are currently in) shows where the sam executable was installed to. Ensure this absolute path is included in your PATH variable. If it is not, edit your ~/.bash_profile file to do so. This absolute path can be found by running: python -m site --user-base

If this wasn't your issue, refer to the official AWS documenation mentioned above.

Create an AWS Account

Log in to AWS Account

Create Non-Root User(s)

Other than to create auxiliary users or requesting service line increases, the root account should NEVER be used for signing in to AWS. Follow these steps to set up a minimal admin user to use for the rest of this setup.

  • Go to AWS' IAM service to manage users
  • Click the 'Add user' button
    • Provide a username and password
    • Specify that this user should have programmatic and console access
    • Proceed to Permissions...
    • Click the 'Attach existing policies directly' tab
    • Select 'AdministratorAccess'
    • Click 'Review'
    • Click 'Create'
    • Copy the 'Access key ID' and the 'Secret access key' from this screen
      • THIS IS THE ONLY TIME YOU WILL HAVE ACCESS TO THE 'SECRET ACCESS KEY', SO MAKE SURE YOU SAVE IT SOMEWHERE BEFORE PROCEEDING
  • Use the AWS CLI (installed near the beginning of this document) to add these access keys
    • From your command line, type aws configure
    • Enter your Access Key
    • Enter your Secret Key
    • Enter 'us-east-1' for the 'Default region name'

Set Up Code Bucket

To deploy the serverless version of this code, you will need to create a secured "bucket" in AWS' storage service.

From your command line,

aws s3 mb s3://sam-skeleton

Releases

Packages

Contributors

Languages