Code Monkey home page Code Monkey logo

test-wsgi-2's Introduction

Serverless Framework Python Flask API on AWS

This is my first attempt at making a Flask API on AWS with Serverless

requirements

You'll need to add a vars.yml file that contains values for the variables:

  • bucket_data ( for image file storage )
  • bucket_serverless ( for serverless file storage )
  • image_table_name ( for image file metadata )
  • aws_region
  • cognito_user_pool_id
  • cognito_user_pool_client_id
  • cognito_user_pool_client_secret
  • cognito_domain
  • cognito_authenticated_url
  • jwt_secret_key
  • jwt_algorithm

test-wsgi-2's People

Contributors

robjy avatar

Watchers

 avatar

test-wsgi-2's Issues

can't deploy from mac

Only deploying from linux is working since adding the cryptography package.

I've tried many things, but none worked.

It seems like etting the lambda architecture to arm by setting arch to arm64 in serverless.yml should work, but it doesn't.

add login with cognito user pool

  • use Flask app.config
  • create Cognito user pool
    • verify email to use as sender in Cognito communications (like when sending user invitation)
      - [ ] AWS SSM Parameter Store or AWS Secret Manager
  • integrate with Flask app

add exception handling for file upload

Some thoughts:

  • add db entry for failed job and show pane of upload messages for user (like in Minerva Cloud)
  • log error details for later debugging
  • give user-friendly message about errors

fix post upload routing and messaging

I tried to redirect inside the promise resolve and reject, but it didn't work. Need to look into doing this correctly, but not sure where we should be going yet, so I'm just making this ticket so I don't forget.

modify image import to be like Minerva Cloud

From Jeremy's suggestion:

the Minerva Cloud image import design is to use bulk S3 upload to a staging bucket, then an import task extracts the content into a cloud-friendly form (zarr) in a different bucket and archives the original file in glacier.

He also mentioned that it should be generalized and then make image import a specific instance of that.

refactor exception handling

Need a unified exception catching scheme and need to send users to endpoints that alert them to specific problems.
It would be nice to also give users suggestions for correcting or at least who to contact to correct each kind of issue.

fix file listing

URLs need to be in links with the filename as the list items.

display image files

We'll also need sliders for each color channel for users to set preferences.

automated testing of secure endpoints

At the very least we should have a cron job that tries the secure endpoints to make sure unauthenticated users can't get in and sends mail or slack message if it fails.
Could do something nicer with Selenium.

make db table for user image preferences

We need to have a working image and user table before this can be added because we'll user userID and imageID as primary key.

first pass page:

  • let user select from a range of images
  • get channels based on image selected
  • if preferences for image already exist, show them
  • let user select min/max for each channel
  • save the above min/max preferences to db

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.