Next.Js 14 – AWS S3 File Upload Server Actions

By Raddy in NextJs ·

In this video I will guide you thru the process of creating an AWS S3 Bucket and applying public permissions so that files are available to anyone of the internet.

In the second half of the video, I’ll demonstrate creating a file upload form using NextJs and the official AWS S3 Client SDK. This time instead of an API Route, I am going to use Server Actions for the upload form.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::your-bucket-arn-name/*"
        }
    ]
}

Support This Work

If you found this guide helpful, consider supporting me with a small donation. Your contribution helps me keep these tutorials up to date and create more quality content.

Donation QR Code

Scan to donate

Leave a Reply

Your email address will not be published. Required fields are marked *