Project template for using aws-cdk, Chalice and React in concert, including RDS Postgresql and AWS Cognito

Overview

What is This?

This repository is an opinonated project template for using aws-cdk, Chalice and React in concert. Where aws-cdk and Chalice are in Python and React is in Javascript. The idea is to quickly build an API in Python with Chalice, deploy it easily with aws-cdk, and then access resources through a React frontend app including user authentication via AWS Cognito.

This is still under active development but some steps towards a full integration are done. It can be developed and run locally via docker compose. Infrastructure and Chalice deployments are still seperate and some copy and pasta is necessary to pass runtime parameters to the right places, but the aim is to have it fully integrated at some point.

The cognito user pool is not part of the infractructure (aws-cdk), yet, and has to be created manually, e.g. in the web UI.

The following files need to be edited with custom AWS parameters and some renamed:

backend/.chalice/config_sample.json
backend/.chalice/policy_sample.json
backend/app.py # cognito ids
backend/cli.py # cognito ids

frontend/env.development.local_sample
frontend/env.production.local_sample

Things still Todo:

  • Figure out how to run the create table command after deployment
  • Create Todo list CRUD backend
  • Create Todo list CRUD frontend
  • Integrate Chalice into aws-cdk code, using from chalice.cdk import Chalice

Checkout cheatsheet.md for some useful CLI commands.

Quickstart

First, you'll need to install the AWS CDK if you haven't already. The CDK requires Node.js and npm to run.

$ npm install -g aws-cdk

Next you'll need to install the requirements for the project.

$ pip install -r requirements.txt

There's also separate requirements files in the infrastructure and backend directories if you'd prefer to have separate virtual environments for your CDK and Chalice app.

To deploy the application, cd to the infrastructure directory. If this is you're first time using the CDK you'll need to bootstrap your environment.

$ cdk bootstrap

Then you can deploy your infrastructure using the CDK.

$ cdk deploy

Now cd into the backend folder and then you can deploy your application using Chalice.

$ chalice deploy --stage prod

Node deployment

Now cd into the frontend folder

DOCKER_BUILDKIT=1 docker build -f Dockerfile.build --output . .

aws s3api create-bucket --bucket my_bucket --region moon-east-1 --create-bucket-configuration LocationConstraint=moon-central-1

aws s3 sync ./build s3://my_bucket

aws s3 website s3://my_bucket --index-document index.html --error-document error.html

Project layout

This project template combines a CDK application, a Chalice application and a React application.

These correspond to the infrastructure, backend and frontend directory, respectively. To run any CDK CLI commands, ensure you're in the infrastructure directory, to run any Chalice CLI commands ensure you're in the backend directory, and to run React CLI commands ensure you are in the frontend directory.

Owner
Rasmus Jones
Rasmus Jones
A Python Library to interface with Tumblr v2 REST API & OAuth

Tumblpy Tumblpy is a Python library to help interface with Tumblr v2 REST API & OAuth Features Retrieve user information and blog information Common T

Mike Helmick 125 Jun 20, 2022
universal messaging & notifications api

Pronounced "boat-shahft" What is botschaft? Botschaft is unified messaging & notifications appliance. Want to text yourself when a long-running task c

Tyler M. Kontra 25 Aug 16, 2022
一个基于Python3的Bot。目前支持以Docker的方式部署在vps上。支持Aria2、本子下载、网易云音乐下载、Pixiv榜单下载、Youtue-dl支持、搜图。

介绍 一个基于Python3的Bot。目前支持以Docker的方式部署在vps上。 主要功能: 文件管理 修改主界面为 filebrowser,账号为admin,密码为admin,主界面路径:http://ip:port,请自行修改密码 FolderMagic自带的webdav:路径:http://

Ben 650 Jan 08, 2023
VoiceMaster-Discord-Bot - Fork from original Discord bot with max channel limit, staff role and more

VoiceMaster VoiceMaster is a discord bot created to change the way servers work,

2 Feb 28, 2022
A simple, fast, and awesome discord nuke bot! The only thing you need to add is your bot token.

SimpleNukeBot A simple, fast, and awesome discord nuke bot! The only thing you need to add is your bot token. Instructions: All you need to do is crea

Bisc 1 Apr 18, 2022
Python client for Messari's API

Messari API Messari provides a free API for crypto prices, market data metrics, on-chain metrics, and qualitative information (asset profiles). This d

Messari 85 Dec 22, 2022
Instagram - Instagram Account Reporting Tool

Instagram Instagram Account Reporting Tool Installation On Termux $ apt update $

Aryan 6 Nov 18, 2022
Easy to use API Wrapper for somerandomapi.ml.

Overview somerandomapi is an API Wrapper for some-random-api.ml Examples Asynchronous from somerandomapi import Animal import asyncio async def main

Myxi 1 Dec 31, 2021
pymobiledevice fork with more recent coding standards and many more features

Description Features Installation Usage Sending your own messages Lockdown messages Instruments messages Example Lockdown services com.apple.instrumen

255 Dec 28, 2022
WhatsAppCrashingToolv1.1 - WhatsApp Crashing Tool v1.1

WhatsAppCrashingTool v1.1 This is just for Educational Purpose WhatsApp Crashing

E4crypt3d 3 Dec 20, 2022
The unofficial Amazon search CLI & Python API

amzSear The unofficial Amazon Product CLI & API. Easily search the amazon product directory from the command line without the need for an Amazon API k

Asher Silvers 95 Nov 11, 2022
Facebook open graph api implementation using the Django web framework in python

Django Facebook by Thierry Schellenbach (mellowmorning.com) Status Django and Facebook are both rapidly changing at the moment. Meanwhile, I'm caught

Thierry Schellenbach 1.4k Dec 29, 2022
💀 The first raid tool of its kind. Inject Deadcord and raid servers directly from the Discord client.

💀 Deadcord The next upcoming Discord raid tool, the best for free. 🎉 Early Beta Released We have released an early version of Deadcord, please keep

Galaxzy 157 May 24, 2022
Texting service to receive current air quality conditions and maps, powered by AirNow, Twilio, and AWS

The Air Quality Bot is generally available by texting a zip code (and optionally the word "map") to (415) 212-4229. The bot will respond with the late

Alex Laird 8 Oct 16, 2022
You have 3 files: create mass groups, add mass members, rename all groups (only educational use!)

EDUCATIONAL ONLY! HOW TO INSTALL Edit config.json with your discord account token and the imagepath (if its in the same location as the all_together.p

46 Dec 27, 2022
A template / demo bot for the Halcyon matrix bot library

Halcyon stock bot Hello! This is an example / template bot using the halcyon matrix bot library. Feel free to ask questions in the matrix chat #halcyo

Wes Ring 1 Feb 04, 2022
Tracks how much money a profile has in their bank and graphs it, as long as they enable the bank api

Tracks how much money a profile has in their bank and graphs it, as long as they enable the bank api. (you could really use this to track anything from the hypixel api)

1 Feb 08, 2022
Requests based multi-threaded script for increasing followers on Spotify

Proxyless Spotify Follow Bot Requests based multi-threaded script for increasing followers on Spotify. Click here to report bugs. Usage Download ZIP h

397 Jan 03, 2023
Python wrappers for INHECO ODTC and SCILA libraries by INHECO GmbH.

Python wrappers for INHECO ODTC and SCILA libraries by INHECO GmbH.

1 Feb 09, 2022
A simple telegram voting bot based on the python-telegram-bot api.

A simple telegram voting bot based on the python-telegram-bot api. *To make it more easy to use, I might make a C++ code in the future so you don't ha

3 Sep 13, 2021