file-management-api

module
v0.0.0-...-e801363 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2021 License: Apache-2.0

README

file-management-api

Lambda REST API for files managed in the larger 281p1 application

Deployment

Deployed via serverless framework dashboard

// after setting up serverless account, creating app, etc.
$ serverless login
$ make deploy

Middleware

JWT Token Authorization
Checks the JWT Token agains the userpool and userpool client id 
Setup on API Gateway

APIGateway Endpoints/Lambdas

Endpoint: /user-id/file-id
Description: Get, delete, and modify particular files
HTTP Methods: GET, PATCH, DELETE
Authorization: Admin, User
Middleware:
Endpoint: /user-id
Description: Get files associated with a particular user, or upload a file for that user
HTTP Methods: GET, POST
Authorization: Admin, User
Endpoint: /
Description: Get all files that are uploaded
HTTP Methods: GET 
Authorization: Admin

Other Lambda Functions

Endpoint: None
Usage: Lambda@Edge Function for Cloudfront Distribution for limiting access to distribution to authenticated users.
Implementation:
    Decodes JWT, and checks for correct user authorizations against Cognito Identity Pool (Federated Identities)

Directories

Path Synopsis
Package uuid generates and inspects UUIDs.
Package uuid generates and inspects UUIDs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL