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
MCNameBot is a fast discord bot that is used to check the availability of a Minecraft name with a simple command.

MCNameBot MCNameBot is a fast discord bot that is used to check the availability of a Minecraft name with a simple command. If you would like to just

Killin 2 Oct 11, 2022
Pycardano - A lightweight Cardano client in Python

PyCardano PyCardano is a standalone Cardano client written in Python. The librar

151 Dec 31, 2022
Telegram-Discord Bridge

imperial-toilet Скрипт, пересылающий сообщения из нескольких каналов Telegram в один/несколько каналов Discord. Технически это Telegram-юзербот и Disc

1 Jan 17, 2022
Wats2PDF - Convert whatsapp exported chat(without media) into a readable pdf format

Wats2PDF convert whatsApp exported chat into a readable pdf format. convert with

5 Apr 26, 2022
A reddit bot that imitates the popular reddit bot "u/repostsleuthbot" to trick people into clicking on a rickroll

Reddit-Rickroll-Bot A reddit bot that imitates the popular reddit bot "u/repostsleuthbot" to trick people into clicking on a rickroll Made with The Py

0 Jul 16, 2022
A clean, easy to scale discord bot template

A clean, easy to scale discord bot template. Develope using nextcord library and can be use with any other discord.py forked library.

めがねこ 3 Mar 03, 2022
Tsar-Bot - Crypto auto trade bot that use sentiment analysis from twitter

Tsar Bot - Crypto Sentiment Bot Tsar Bot is a Twitter Crypto Sentiment Bot that

Hilmi Azizi 26 Dec 15, 2022
WhatsApp Multi Device Client

WhatsApp Multi Device Client

23 Nov 18, 2022
Robust and blazing fast open-redirect vulnerability scanner with ability of recursevely crawling all of web-forms, entry points, or links with data.

After Golismero project got dead there is no more any up to date open-source tool that can collect links with parametrs and web-forms and then test th

railway zeppelin 34 Aug 25, 2022
scrape tiktok/douyin video list from specific user or keyword

get-tiktok-user-video-list scrape tiktok/douyin video list from specific user or keyword 以**https://www.douyin.com/user/MS4wLjABAAAAUpIowEL3ygUAahQB47

wanghaisheng 4 Jul 06, 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
Instant messaging client in tkinter

Concord_client_tk Instant messaging client in tkinter Contributors : Ilade-s [https://github.com/Ilade-s] Doku [https://github.com/D0kuhebi] Descripti

Raphaël Merlet 2 Jun 15, 2022
Ap lokit lokit

🎵 FANDA MUSIC BOT Fanda Music adalah proyek bot telegram yang memungkinkan Anda memutar musik di obrolan suara grup telegram. a href="https://www.py

Fatur 2 Nov 18, 2021
Social Framework

Social Int Framework Social Int Framework its a Selenium script that scrape the IG photos and do a Reverse search on google and yandex for finding ano

29 Dec 06, 2022
ANKIT-OS/TG-SESSION-GENERATOR-BOTbisTG-SESSION-GENERATOR-BOT a special repository. Its Is A Telegram Bot To Generate String Session

ANKIT-OS/TG-SESSION-GENERATOR-BOTbisTG-SESSION-GENERATOR-BOT a special repository. Its Is A Telegram Bot To Generate String Session

ANKIT KUMAR 1 Dec 26, 2021
An API wrapper around the pythonanywhere's API.

pyaww An API wrapper around the pythonanywhere's API. The name stands for pythonanywherewrapper. 100% api coverage most of the codebase is documented

7 Dec 11, 2022
A little proxy tool based on Tencent Cloud Function Service.

SCFProxy 一个基于腾讯云函数服务的免费代理池。 安装 python3 -m venv .venv source .venv/bin/activate pip3 install -r requirements.txt 项目配置 函数配置 开通腾讯云函数服务 在 函数服务 新建 中使用自定义

Mio 716 Dec 26, 2022
An advanced telegram language translator bot

Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github.com/FayasNoushad/Translator-Bot-V3/blob/main/LICE

Fayas Noushad 19 Dec 24, 2022
Discord bot script for sending multiple media files to a discord channel according to discord limitations.

Discord Bulk Image Sending Bot Send bulk images to Discord channel. This is a bot script that will allow you to send multiple images to Discord channe

Nikola Arbov 1 Jan 13, 2022
A discord nitro generator written in python

VerseGenerator A discord nitro generator written in python Usage ・Fork the repo ・Clone it to replit ・Install the required packages and run it ・Input t

NotDrakezz 4 Nov 13, 2021