Skip to content

venkateshchary/Chalice-lambda-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Aws services deploy using the Chalice Framework

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgements

About The Project

![Chalice Examples][product-screenshot]

Here's why:

  • Chalice will take care of deployment
  • We can run api services in local with using the aws credentials
  • Using the single config.json we can configure the all services

Built With

Getting Started

Prerequisites

  • python
      sudo apt install python3
      source venv/bin/activate

Installation

  1. Clone the repo

    git clone https://github.com/venkateshchary/Chalice-lambda-python.git
  2. Install Python packages

     source venv/bin/activate
     pip3 install chalice
     pip3 install flask
  3. Create chalice app

     chalice new-project hello_aws
     chalice local # to run the dev stage
  4. Add configurations in config.json

    {"version": "2.0","app_name": "dev_hello","stages": {
    "dev": {
       "api_gateway_stage": "api",
       "manage_iam_role":false,
       "iam_role_arn":"arn:aws:iam::xxxxx:role/user_role",
       "subnet_ids": ["subnet-xxxxx",
         "subnet-xxxxx",
         "subnet-xxxxx"],
       "security_group_ids": ["sg-xxx"],
       "layers": ["arn:aws:lambda:xxxxx:layer:pymysql-py36:1"],
       "lambda_functions": {
         "hello_world": {
           "lambda_timeout": 60
         },
         "processors": {
           "lambda_timeout": 900,
           "lambda_memory_size": 960
         }
       },
       "environment_variables":{
         "bucket_name":"s3_bucket",
         "database":"db_name",
         "username":"username",
         "password":"rds password",
         "host":"rds host url"
       },
       "tags": {
         "owner":"USER",
         "purpose":"engineering",
         "environment":"dev",
       }
       }
     }
     }

License

Distributed under the MIT License. See LICENSE for more information.

About

An AWS python library to deploy the rest api calls in lambda

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages