AWS S3 Image Upload

AWS S3 Image Upload

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

0

boilerplate.detail.metadata.lastUpdated

il y a 2 mois

R

boilerplate.detail.metadata.author

Renaud

boilerplate.detail.metadata.price

boilerplate.detail.metadata.free

npx boilerapp aws-s3-image-upload-nextjs

Documentation

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\

boilerplate.detail.sections.discussion

Comments (0)

FAQ

Frequently Asked Questions

Have a question? We have the answers. If you can't find what you're looking for, feel free to contact us.

Boilerapp is a community platform dedicated to sharing boilerplates, starter kits, and project templates for developers. Our goal is simple: save you time on initial setup so you can code what really matters. Whether you are looking for a simple code base or a complete SaaS project, you will find it here.

Have more questions?

Our team is here to help. Contact us and we will get back to you as soon as possible.

AWS S3 Image Upload | BoilerApp