GuidesHost Guides
AWS S3 Setup
Step-by-step guide to creating AWS S3 bucket and IAM credentials for BAP storage.
AWS S3 Setup
This guide walks through setting up AWS S3 storage for BAP, including creating an S3 bucket and IAM user with proper permissions.
Prerequisites
- An AWS account
- AWS Management Console access
Part 1: Create an S3 Bucket
Step 1: Navigate to S3
- Log into AWS Console
- Search for "S3" in the services bar
- Click "S3" to open the S3 dashboard
Step 2: Create Bucket
- Click "Create bucket"
- Configure the bucket:
| Setting | Value | Notes |
|---|---|---|
| Bucket name | bap-wills-[your-name] | Must be globally unique |
| Region | Choose your region | Note this for later |
| ACLs enabled | Disabled (recommended) | Uses bucket policies |
| Block Public Access | Checked | Keep public access blocked |
| Bucket Versioning | Enabled (optional) | For backup retention |
| Tags | Optional | Add cost tracking tags |
- Click "Create bucket"
Step 3: Configure Bucket Settings
- Click on your new bucket name
- Go to the "Permissions" tab
- Under "Bucket policy", add this policy to allow your IAM user access:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowIAMUserAccess",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::ACCOUNT_ID:user/bap-user"
},
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::bap-wills-YOUR_NAME",
"arn:aws:s3:::bap-wills-YOUR_NAME/*"
]
}
]
}
Replace ACCOUNT_ID with your AWS account ID and bap-wills-YOUR_NAME with your bucket name.
Part 2: Create IAM User
Step 1: Navigate to IAM
- Search for "IAM" in AWS services
- Click "IAM" → "Users"
- Click "Add users"
Step 2: Create User
- Enter a username:
bap-user - Select "Access key - Programmatic access"
- Click "Next: Permissions"
Step 3: Attach Permissions
- Click "Attach policies directly"
- Click "Create policy" (opens new tab)
- Switch to the "JSON" tab
- Paste this policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::bap-wills-YOUR_NAME",
"arn:aws:s3:::bap-wills-YOUR_NAME/*"
]
}
]
}
- Click "Next: Tags" → "Next: Review"
- Name the policy:
BAP-S3-Access - Click "Create policy"
Step 4: Complete User Creation
- Go back to the IAM user creation tab
- Click the refresh icon
- Search for and select
BAP-S3-Access - Click "Next: Tags" → "Next: Review"
- Click "Create user"
Step 5: Save Credentials
Important: This is the ONLY time you'll see the secret access key.
- On the success screen, you'll see:
- Access key ID (e.g.,
AKIAIOSFODNN7EXAMPLE) - Secret access key (e.g.,
wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY)
- Access key ID (e.g.,
- Copy and save both values immediately
- Click "Done"
Part 3: Get Required Values
You'll need these values for BAP configuration:
| Value | Where to Find |
|---|---|
| Access Key ID | IAM → Users → bap-user → Security credentials |
| Secret Access Key | Shown only at user creation time |
| Bucket Name | S3 → Bucket name you created |
| Region | When creating bucket (e.g., us-east-1) |
Part 4: S3-Compatible Storage
For S3-compatible providers (DigitalOcean Spaces, MinIO, Wasabi, etc.), use:
| Provider | Endpoint Example |
|---|---|
| DigitalOcean Spaces | https://nyc3.digitaloceanspaces.com |
| Wasabi | https://s3.wasabisys.com |
| MinIO | https://your-minio-server:9000 |
DigitalOcean Spaces Example
{
"type": "s3",
"access_key_id": "DOEXAMPLEACCESSKEY",
"secret_access_key": "your-secret-key",
"bucket": "bap-wills",
"region": "nyc3",
"endpoint": "https://nyc3.digitaloceanspaces.com",
"path_style": true
}
Troubleshooting
"The bucket you are attempting to access must be addressed using the specified endpoint"
- Check your region matches where the bucket was created
- For S3-compatible, use the
endpointparameter
"Access Denied" error
- Verify IAM user has the correct policy attached
- Check bucket policy allows the IAM user
- Ensure bucket is in the same region as your IAM user
"Invalid access key" error
- Double-check the Access Key ID is correct
- Verify the Secret Access Key matches exactly
Credentials not working
- IAM users can have permissions changed — verify policy is attached
- Check the IAM user isn't disabled
Security Best Practices
- Use IAM user, not root — Don't use root AWS credentials
- Least privilege — Only grant S3 permissions needed
- Rotate keys — Create new keys and delete old periodically
- Enable versioning — For backup/restore capability
- Use server-side encryption — S3 has built-in encryption (optional)
Next Steps
- Return to Connecting Storage to complete the setup
- Add your Access Key ID, Secret Access Key, Bucket Name, and Region in the BAP dashboard