Code Room
Vibe codingMedium
Question
You asked an AI assistant to "create an S3 bucket for storing user-uploaded avatars served by the web app." It produced this Terraform. It plans clean and applies. Review it and explain what's wrong before it ships.
resource "aws_s3_bucket" "avatars" { bucket = "acme-prod-avatars"} resource "aws_s3_bucket_public_access_block" "avatars" { bucket = aws_s3_bucket.avatars.id block_public_acls = false block_public_policy = false ignore_public_acls = false restrict_public_buckets = false} resource "aws_s3_bucket_policy" "avatars" { bucket = aws_s3_bucket.avatars.id policy = jsonencode({ Version = "2012-10-17" Statement = [{ Effect = "Allow" Principal = "*" Action = "s3:GetObject" Resource = "${aws_s3_bucket.avatars.arn}/*" }] })}What a strong answer looks like
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it — tests, edge cases, reading critically — and how you’d re-prompt or decompose to get it right.
Learn the concepts
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.
Run or narrate your approach, then ask the coach.