List of serverless functions for AWS S3. Easy deploy with Vercel CLI

Serverless Functions

List of Serverless Functions used in taggy.cloud

Setup

yarn install && yarn setup

Run(Local)

yarn start

It will use environment variables specified in Vercel.

Deploy

yarn deploy

ENV

BUCKET_NAME=""
BUCKET_REGION=""
ACCESS_KEY_ID=""
SECRET_KEY=""

Note that .env file will not work. You need to set environment variables in vercel, and use it with os.Getenv.

Example

Object name in S3 is ${userId}.${fileName}.

const URL = 'something';

const res = await fetch(`${url}/api/presigned`, {
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  method: 'POST',
  body: JSON.stringify([{ userId, fileName }]),
});

console.log(await res.json()); // ["some url for 1.txt"] (String[])
const URL = 'something';

const res = await fetch(`${URL}/api/zipped`, {
  headers: {
    Accept: 'text/plain',
    'Content-Type': 'application/json',
  },
  method: 'POST',
  body: JSON.stringify([
    {
      "userId": "example1",
      "fileName": "1.txt"
    },
    {
      "userId": "example1",
      "fileName": "2.txt"
    },
  ]),
});

await res.text(); // "some url for zipped file of 1.txt and 2.txt" (String)
Owner
Jayden
Currently building stuffs with @remix-run, @prisma and @planetscale.
Jayden
Similar Resources

A CLI tool to manage and streamline AWS ECS deployments

Outback CLI 🦘 About The Project Outback is CLI tool written in Go to help streamline the process of deploying containerized applications to AWS Elast

Dec 8, 2021

A simple CLI tool that outputs the history of connections to Amazon EC2 instances using AWS Session Manager.

ssmh This is a simple CLI tool that outputs the history of connections to Amazon EC2 instances using AWS Session Manager. Installation brew install mi

Dec 10, 2021

Opinionated CLI app for AWS SSO made in Golang!

Opinionated CLI app for AWS SSO made in Golang!

aws-sso-creds AWS SSO Creds Table of Contents About The Project Built With Instalation Static From source Usage Contributing License Contact Acknowled

Aug 17, 2022

Dev-spaces - A CLI to help creating development environments using AWS Spot Instances

This is a CLI to help creating on-demand development spaces using EC2 Spot Intances.

Nov 9, 2022

An easy to use menu structure for cli applications that prompts users to make choices.

An easy to use menu structure for cli applications that prompts users to make choices.

WMenu Package wmenu creates menus for cli programs. It uses wlog for its interface with the command line. It uses os.Stdin, os.Stdout, and os.Stderr w

Dec 26, 2022

Rem is a CLI trash which makes it ridiculously easy to recover files.

Rem is a CLI trash which makes it ridiculously easy to recover files.

Rem is a CLI trash which makes it ridiculously easy to recover files. We've all had that moment when we've deleted something we realised we shouldn't have. It sucks. Let's fix that!

Dec 21, 2022

An easy-to-use cli tool for downloading manga

An easy-to-use cli tool for downloading manga

mangodl Download and search manga right from the terminal! Report Bug || Request Feature Table of Contents About the Project Built With Getting Starte

Nov 26, 2022

A go cli makes it easy to get quotes from the Ted Lasso Quotes API

Ted Lasso Quotes CLI This cli makes it easy to get quotes from the Ted Lasso Quotes API Just clone the repo and build the binary for your distribution

Jun 15, 2022

Easy to use CLI for cryptography

EDH (Encryption, Decryption, Hashing) Utility that aims to improve efficiency of encryption, decryption and hashing by making a simple to use CLI Writ

Nov 4, 2021
CLI for exploring AWS EC2 Spot inventory. Inspect AWS Spot instance types, saving, price, and interruption frequency.

spotinfo The spotinfo is a command-line tool that helps you determine AWS Spot instance types with the least chance of interruption and provides the s

Dec 19, 2022
CLI tool to update ~/.aws/config with all accounts and permission sets defined in AWS SSO

aws-sso-profiles Generate or update ~/.aws/config with a profile for each SSO account you have access to, by using an existing AWS SSO session. Bootst

Nov 3, 2022
Simple to do list API with Gin and Gorm (with Postgres)Simple to do list API with Gin and Gorm (with Postgres)

go-todo Simple to do list API with Gin and Gorm (with Postgres) Docker Clone this repository and run: docker-compose up You can then hit the followin

Aug 29, 2022
A simple shopping list that keeps track of a users shopping list using charm.sh tools

Terminal Shopping List This repo is a practise project for learning practical Go. I have chosen to use a toolset called Charm as it provides a rich se

Jan 13, 2022
A fork of k3sup that lets you quickly deploy RKE2 clusters via the CLI.

k2sup This is an awful hack of a fork of Alex Ellis' k3sup - a light-weight utility to get from zero to KUBECONFIG, originally with K3s but now with R

Dec 12, 2022
✨ Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!
✨ Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!

✨ Create a new production-ready project with backend, frontend and deploy automation by running one CLI command!

Dec 31, 2022
Yikes is a cli-application to simplify the process to maintaining a list of tasks to complete.

yikes Yikes is a cli-application to simplify the process to maintaining a list of tasks to complete. It also has commands to help store random notes a

Oct 7, 2021
cli tools for list all pages in logseq repo, marked with public or private

logseq-pages A cli tool for list all pages in logseq repo, marked with public or private. When I using logseq to build my knowledge base and publish p

Dec 12, 2022
A CLI tool for working with CloudWatch logs. It performs functions that I need at work.

CloudWatch Logs Utility A simple utility for working with CloudWatch Logs. AWS should probably build this themselves, but since they won't, I am here

Dec 31, 2021
A Mighty CLI for AWS
A Mighty CLI for AWS

awless is a powerful, innovative and small surface command line interface (CLI) to manage Amazon Web Services. Twitter | Wiki | Changelog Why awless a

Dec 31, 2022