S3 (Simple Storage Service) = AWS cloud storage for files
Use cases: Store files, images, videos, backups, static websites
Rules:
Problem: demo-bucket → Already taken by someone else
Solution: Make it unique → yourname-demo-bucket-2026
resource "aws_s3_bucket" "demo_bucket" {
↑ Type (fixed) ↑ Label (your choice)
bucket = "actual-bucket-name"
}
# Access it:
aws_s3_bucket.demo_bucket.bucket
↑ Type ↑ Label ↑ Attribute (the actual name)
Remember: resource_type.your_label.attribute
Example: .bucket.bucket → First is your label, second is the attribute name