Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

AWS updated their S3 bucket naming rules to reserve additional prefixes and suffixes. The ruleset was missing four restrictions from the current documentation.

Changes

  • Added amzn-s3-demo- to restricted prefix regex (used for AWS documentation examples)
  • Added .mrap suffix restriction (Multi-Region Access Points)
  • Added --x-s3 suffix restriction (AWS reserved)
  • Added --table-s3 suffix restriction (S3 Tables feature)

Example

resource "aws_s3_bucket" "invalid" {
  bucket = "amzn-s3-demo-bucket"  # Now caught as invalid
}

resource "aws_s3_bucket" "invalid" {
  bucket = "my-bucket.mrap"  # Now caught as invalid
}
Original prompt

Please update regexRules in rules/aws_s3_bucket_name.go


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: wata727 <9624059+wata727@users.noreply.github.com>
Copilot AI changed the title [WIP] Update regexRules in aws_s3_bucket_name.go Add missing AWS S3 bucket naming restrictions Nov 1, 2025
Copilot AI requested a review from wata727 November 1, 2025 13:38
Copilot finished work on behalf of wata727 November 1, 2025 13:38
@wata727 wata727 marked this pull request as ready for review November 1, 2025 14:54
@wata727 wata727 enabled auto-merge (squash) November 1, 2025 14:54
@wata727 wata727 merged commit 6ce768e into master Nov 1, 2025
21 checks passed
@wata727 wata727 deleted the copilot/update-regex-rules-s3-bucket branch November 1, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants