Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Upload image to S3 - Serverless Framework (AWS)

API created for fetch an image and upload to a S3 bucket.

Get started

Install

yarn npm install

Create .env

Use the env.example to create an .env file.

Deploy

serverless deploy

Test

npm run test

ESlint

npm run lint

Usage

Register

POST https://hgdek56d34.execute-api.us-east-1.amazonaws.com/prod/register

Body:

{
    "email": "test@gmail.com",
    "password": "test123",
    "name": "Test"
}

Login

POST https://hgdek56d34.execute-api.us-east-1.amazonaws.com/prod/login

{
    "email": "test@gmail.com",
    "password": "test123"
}

Upload Image

POST https://hgdek56d34.execute-api.us-east-1.amazonaws.com/prod/images

Header:

Authorization: Bearer ACCESS_TOKEN

Body:

{
    "image_url": "https://github.githubassets.com/images/modules/open_graph/github-mark.png",
    "key": "github.png"
}

About

Fetch and upload image to S3 using Serverless framework

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages