Package: aws-lambda-api-builder
###RequirementsPython 3.6PipInstall Dependenciespipenvpip install pipenvawsclipip install awscliInstall aws-lambda-api-builderInstall from pip:pip install aws-lambda-api-builderInstall from Githubgit clone https://github.com/zmiler91/aws-lambda-api-builder
cd aws-lambda-api-builder
pipenv install
python setup.py sdist bdist_wheel
pipenv install -e .If you've installed aws-lambda-api-builder from Github then you will need to usepipenv shellin order for yourzlabto be recognized.pipenv shell
zlab --help

> usage: api_builder [sub-command] [options]
> 
> This is a CLI to build, package, and release AWS APIs using API Gateway and
> Lambda.
> 
> positional arguments:
>  {lambda}
> 
> optional arguments:
>   -h, --helpSetupSince aws-lambda-api builder uses boto3 to interact with AWS, you will need to install and configure the AWS CLI. If you
have not already installed the AWS CLI, please refer to the "Install Dependencies" section of this README.Creating an S3 bucketaws-lambda-api-builderwill upload a zipped archive of your application to S3 so it can be used in your Lambda
functions. You can use the AWS console to create an S3 bucket; for the purposes of this README I've created a bucket
calledmy-example-api.Creating an IAM PolicyWe will be creating an IAM User foraws-lambda-api-builderin the next section, but before we do so we will need
to create an IAM Policy so we can limit the user's permissions and only allow them to read out of the bucket created
in the previous section.You can create this policy using the Visual Editor or you can copy the JSON document below replacingmy-example-apiwith the name of your S3 bucket:{"Version":"2012-10-17","Statement":[{"Sid":"VisualEditor0","Effect":"Allow","Action":"s3:PutObject","Resource":["arn:aws:s3:::my-example-api/*"]}]}Once you've defined your policy you will need to give your policy a name, for the purposes of this README I've name my
policyaws-lambda-api-builder-s3. You can also give your policy an optional description. If you want to grant
access to multiple buckets, then you just need to add the bucket to theResourcearray in the policy document.Creating an IAM Useraws-lambda-api-builder needs access to some resources in your AWS account so it can upload S3 files that contain your
zipped archive.  To do this, you'll want to create an IAM user in the AWS console.User name: aws-api-lambda-builder
Access type: Programmatic accessAfter you've defined the name and access type, you will be asked to set a permission.  You can use the "Attach existing
policies directly" option and find and select the policy created in the previous section.Once the user has been created you will be provided an "Access key ID" and a "Secret access key", you will want to
remember both of these. Your credentials will only be provided to you once, so you will not be able to recover them
if you do not write them down.Configure AWSOnce you've created your IAM user you will need to configure the AWS CLI.aws configure
> AWS Access Key ID [None]: {access key from the previous section}
> AWS Secret Access Key [None]: {secret access key from the previous section}
> Default region name [None]: {the aws region you're using, mine is us-east-1}
> Default output format [None]:Your configuration and access keys will be saved to the.awsdirectory in your home directory. If you've already
configured your AWS CLI with another user, then you can attach the IAM Policy created in the previous section to
this user.Development EnvironmentIntegrate the pipenv environment by following the instructions here:https://www.jetbrains.com/help/pycharm/pipenv.htmlUsage Examples$ zlab lambda --help