AWS S3 Image Upload

R
Renaudil y a 2 jours
0

Description

Use AWS S3 to upload images to a bucket from a Next.js application.

npx boilerapp aws-s3-image-upload-nextjs

Documentación

Next.js + AWS S3 Upload

This is an example of a Next.js application allowing you to upload photos to an S3 bucket.

How to Use

Option 1: Use an existing S3 bucket.

Retrieve your existing access key, secret key, S3 bucket region and name. Provide those values after clicking "Deploy" to automatically set the environment variables.

Deploy with Vercel

Option 2: Create an S3 bucket.

Execute create-next-app with pnpm to bootstrap the example:

pnpm create next-app --example https://github.com/vercel/examples/tree/main/solutions/aws-s3-image-upload
  1. Create a new S3 Bucket.
    1. In Object Ownership, select "ACLs enabled" and "Bucket owner prefered"
    2. In Block Public Access settings for this bucket, uncheck "Block all public access".
  2. Create a new IAM User.
    1. Select "Attach policies directly".
    2. Add s3:DeleteObject, s3:GetObject, s3:ListBucket, s3:PutObject, s3:PutObjectAcl
  3. Save the access key and secret key for the IAM User.
    1. Select the newly created user (IAM > Users > "your-user") and navigate to "Security Credentials".
    2. Under "Access Keys\

Prix

Gratuit

FREE

Comentarios (0)

FAQ

Preguntas Frecuentes

¿Tienes una pregunta? Tenemos las respuestas. Si no encuentras lo que buscas, no dudes en contactarnos.

Boilerapp es una plataforma comunitaria dedicada a compartir boilerplates, starter kits y plantillas de proyectos para desarrolladores. Nuestro objetivo es simple: hacerte ahorrar tiempo en la configuración inicial (setup) para que puedas programar lo que realmente importa. Ya busques una base de código simple o un proyecto SaaS completo, lo encontrarás aquí.

¿Tienes otras preguntas?

Nuestro equipo está aquí para ayudarte. Contáctanos y te responderemos lo antes posible.

AWS S3 Image Upload | BoilerApp