Prerequisites
- An AWS account (create one here)
- AWS CLI installed (optional, but recommended)
Step 1: Create an S3 Bucket
Navigate to S3 Console
Go to the AWS S3 Console and click Create bucket.
Configure Bucket Settings
Enter the following settings:
vercel-frontend (or your custom name)Choose a region close to your users (e.g.,
us-east-1, us-west-2)Remember this region - you’ll need it for the
AWS_REGION environment variable.Object Ownership
Select ACLs disabled (recommended)
Block Public Access
Keep Block all public access enabled for securityThe application uses IAM credentials, not public access.
Bucket Versioning
Optional - Enable if you want to keep file history
Encryption
Enable Server-side encryption with Amazon S3 managed keys (SSE-S3)
Step 2: Create IAM User and Credentials
Navigate to IAM Console
Go to IAM Console and select Users from the left sidebar, then click Create user.
Set User Details
- User name:
vercel-frontend-service - Leave Provide user access to the AWS Management Console unchecked (this is a programmatic access user)
Set Permissions
Choose Attach policies directly and click Create policy.In the policy editor, switch to JSON tab and paste:Name the policy
This policy grants minimum required permissions:
PutObject: Upload files to S3GetObject: Download files from S3ListBucket: List objects in bucketDeleteObject: Delete files (optional, for cleanup)
VercelFrontendS3Access and create it.Attach Policy to User
Return to the user creation flow, refresh the policy list, and attach
VercelFrontendS3Access to your user.Create Access Keys
After creating the user:
- Click on the user name
- Go to Security credentials tab
- Click Create access key
- Select Application running outside AWS
- Click Next and Create access key
- Access key ID (e.g.,
AKIAIOSFODNN7EXAMPLE) - Secret access key (e.g.,
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY)
Step 3: Set Environment Variables
Add your AWS credentials to your environment:.env
Step 4: Test Your Configuration
Configure AWS CLI
- AWS Access Key ID:
[your-access-key-id] - AWS Secret Access Key:
[your-secret-access-key] - Default region name:
us-east-1(or your region) - Default output format:
json
Bucket Structure
The platform uses the following S3 folder structure:output/{randomId}/: Stores uploaded project source filesdist/{randomId}/: Stores final built artifacts ready for deployment
Security Best Practices
Rotate Access Keys Regularly
Rotate Access Keys Regularly
Create new access keys every 90 days and delete old ones:
Enable S3 Bucket Logging
Enable S3 Bucket Logging
Track access to your bucket:Where
logging.json contains:logging.json
Enable S3 Versioning
Enable S3 Versioning
Protect against accidental deletions:
Use IAM Roles for EC2
Use IAM Roles for EC2
If running on EC2, use IAM roles instead of access keys:
- Create an IAM role with the S3 policy
- Attach the role to your EC2 instance
- Remove
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYenvironment variables
Troubleshooting
Access Denied Errors
Access Denied Errors
Error:
AccessDenied: Access DeniedSolutions:- Verify IAM policy includes required actions (
s3:PutObject,s3:GetObject,s3:ListBucket) - Check bucket name in policy ARN matches actual bucket name
- Ensure bucket policy doesn’t deny access
- Verify credentials are active:
aws sts get-caller-identity
Invalid Access Key ID
Invalid Access Key ID
Error:
InvalidAccessKeyId: The AWS Access Key Id you provided does not existSolutions:- Verify
AWS_ACCESS_KEY_IDis correct (20 characters, starts withAKIA) - Check for extra whitespace in environment variables
- Ensure the IAM user still exists
- Verify the access key hasn’t been deleted
Region Errors
Region Errors
Error:
PermanentRedirect: The bucket is in this region: us-west-2Solutions:- Update
AWS_REGIONto match your bucket’s actual region - Check bucket region:
aws s3api get-bucket-location --bucket vercel-frontend
Bucket Not Found
Bucket Not Found
Error:
NoSuchBucket: The specified bucket does not existSolutions:- Verify bucket name is exactly
vercel-frontend(case-sensitive) - Check bucket exists:
aws s3 ls - Create bucket if missing:
aws s3 mb s3://vercel-frontend --region us-east-1
Next Steps
Environment Variables
Configure all required environment variables
Redis Setup
Set up Redis for build queue management