AWS S3允许通过AWS CLI创建存储桶名称上限 [英] AWS S3 Allows to create bucket name Caps through AWS CLI

查看:331
本文介绍了AWS S3允许通过AWS CLI创建存储桶名称上限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用控制台将S3存储桶名称作为大写字母提供时-会引发错误(不允许使用大写字母)

When you provide S3 bucket name as Capital letters using Console - it throws error (Caps letters not allowed)

但是,当您使用CLI在S3中创建存储桶时-它只是创建.

However, when you create the bucket in S3 using CLI - it just creates.

我缺少任何设置吗?为什么会这样呢?

I'm I missing any settings? Why is this behavior?

推荐答案

如果您使用AWS管理控制台,则存储区名称必须在所有区域中 DNS兼容 .

If you use the AWS Management Console, bucket names must be DNS-compliant in all Regions.

DNS兼容名称的规则2指出:

Rule 2 of DNS compliant name states that:

存储桶名称必须是一个或多个标签的序列.相邻标签 以单个句点(.)分隔.值区名称可以包含 小写字母,数字和连字符. 每个标签必须以 以小写字母或数字结尾.

Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.). Bucket names can contain lowercase letters, numbers, and hyphens. Each label must start and end with a lowercase letter or a number.

因此,您将无法从控制台以 CAPITAL LETTERS 开头创建存储桶(事实上的控制台不允许您在存储桶名称中完全使用CAPITAL LETTERS ),但aws_cli允许您创建以大写字母开头的存储桶名称.

Hence you are NOT able to create bucket starting with CAPITAL LETTERS from console (Infact console doesn't allow you to use CAPITAL LETTERS at all in the bucket-name) but aws_cli allows you to create bucket name starting with caps.

美国东部(弗吉尼亚北部)目前允许更宽松的存储桶命名标准.

The US East (N. Virginia) currently allows more relaxed standards for bucket naming.

您可以查看S3文档此部分中的规则适用于以下规则的规则桶命名.

You can check the rules in this section of S3 documentation Rules for Bucket Naming.

这篇关于AWS S3允许通过AWS CLI创建存储桶名称上限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆