aws/s3-mb

Make S3 Bucket

Create a new S3 bucket.

aws
s3
create
bucket

Command

aws s3 mb s3://my-bucket

Explanation

Creates a new S3 bucket in your AWS account. Bucket names must be globally unique across all AWS accounts.

Common Use Cases

  • Setting up storage for applications
  • Creating region-specific buckets for latency optimization

Best Practices

  • Use DNS-compliant bucket names
  • Create buckets in regions closest to users for performance

Common Mistakes to Avoid

  • Using uppercase or invalid characters in bucket names
  • Not specifying region for region-restricted accounts

Troubleshooting

Problem: BucketAlreadyExists error

Solution: Choose a unique name or add a prefix/suffix.

Problem: Region mismatch

Solution: Use `--region` flag to specify correct region.

Examples

Create bucket named my-bucket

aws s3 mb s3://my-bucket

Create bucket in specific region

aws s3 mb s3://my-bucket --region us-west-2