Skip to content

Face recognition which labels their face to show solidarity

Notifications You must be signed in to change notification settings

jolo-dev/show-solidarity

Repository files navigation

Show Solidarity

MIT License

Due to the current situation, we all need to show Solidarity. Show flag 🇺🇦

Pre-Requisite

Using pyenv

There is a weird issue with Lambda Function and using Pillow library. Due to that, the function uses an open layer from Klayers. Please, consider that the lambda is currently only working with Python 3.8 Runtime. Make sure you install that also on your machine. As a recommendation, you could use pyenv.

pyenv install 3.8.12 # or any 3.8.x version
pyenv local 3.8.12

Tech Stack

  • AWS Step Function
  • AWS S3
  • AWS Lambda
  • Amazon Rekognition
  • AWS CDK with Python
  • Vite + React

Install

make install

If for some reason it does not work, here are the manual steps to install

python3 -m venv .venv
source .venv/bin/activate
pip install requirements.txt

Infrastructure

This is what your infrastructure will look like

Infrastructure

Deploy Infrastructure


NOTE

Since CDK is not able to execute AWS SSO named profiles, make sure you have exported the variables

export AWS_ACCESS_KEY_ID="foo"
export AWS_SECRET_ACCESS_KEY="bar"
export AWS_SESSION_TOKEN="baz"

Synth

synth creates Cloudformation in the infrastructure/cdk.out.

make synth

# If you need to override the `CDK_DEFAULT_ACCOUNT`
CDK_DEFAULT_ACCOUNT=123456 make synth
# or
export CDK_DEFAULT_ACCOUNT=123456

Deployment

make infra

# If you need to override the `CDK_DEFAULT_ACCOUNT`
CDK_DEFAULT_ACCOUNT=123456 make synth
# or
export CDK_DEFAULT_ACCOUNT=123456

Troubleshooting

If the Makefile- command above not working, please check if you activate venv.

source .venv/bin/activate

Running Tests

To run tests, run the following command

make test

Cleaning

Destroy Infrastructure

make destroy_infra

Delete Caches and Packages of Lambda

make clean

License

MIT

Images

Ukraine Flag Vectors by Vecteezy

Photo by Omid Armin on Unsplash.

About

Face recognition which labels their face to show solidarity

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published