Created
July 29, 2021 11:36
-
-
Save rswift/c0a44ca5eb4d446bc89d22bfb09758c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Specifically linked to eu-west-2 so tweak as necessary | |
# | |
arn:aws:s3:eu-west-2:\d{12}:(?=.{3,63}$)(?!(\d+\.)+\d+$)((([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])$) | |
# | |
# passing | |
# | |
arn:aws:s3:eu-west-2:123456789012:abc | |
arn:aws:s3:eu-west-2:123456789012:abcd | |
arn:aws:s3:eu-west-2:123456789012:abcd | |
arn:aws:s3:eu-west-2:123456789012:1234 | |
arn:aws:s3:eu-west-2:123456789012:my-bucket | |
arn:aws:s3:eu-west-2:123456789012:my-bucket1 | |
arn:aws:s3:eu-west-2:123456789012:123mybucket | |
arn:aws:s3:eu-west-2:123456789012:my.1234.bucket | |
# | |
# failing | |
# | |
arn:aws:s3:eu-west-2:123456789012:a | |
arn:aws:s3:eu-west-2:123456789012:ab | |
arn:aws:s3:eu-west-2:123456789012:A | |
arn:aws:s3:eu-west-2:123456789012:AB | |
arn:aws:s3:eu-west-2:123456789012:ABC | |
arn:aws:s3:eu-west-2:123456789012:ABCD | |
arn:aws:s3:eu-west-2:123456789012:aBcD | |
arn:aws:s3:eu-west-2:123456789012:192.168.1.123 | |
arn:aws:s3:eu-west-2:123456789012:abcdef. | |
arn:aws:s3:eu-west-2:123456789012:.xyz | |
arn:aws:s3:eu-west-2:123456789012:my_bucket | |
arn:aws:s3:eu-west-2:123456789012:-mybucket | |
arn:aws:s3:eu-west-2:123456789012:mybucket- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment