亚马逊aws服务取消

One of the biggest requirement in IT sector is to manage the storage. Amazon S3 is nothing but the Simple Storage Service in AWS Cloud. In this topic, we will talk about how Amazon S3 changes everything. Amazon S3 providing practically unlimited and cost-effective storage which is available on-demand.

IT部门最大的需求之一就是管理存储。 Amazon S3就是AWS Cloud中的简单存储服务 。 在本主题中,我们将讨论Amazon S3如何改变一切。 Amazon S3提供按需提供的实际上无限的且具有成本效益的存储。

Not only this, but Amazon S3 also provides the hosting of static websites with high availability and very low-latency. So let’s talk about what is Amazon Simple Storage Service and how to use it?

不仅如此,Amazon S3还提供了具有高可用性和极低延迟的静态网站托管。 那么,让我们谈谈什么是Amazon Simple Storage Service以及如何使用它?

什么是Amazon S3? (What is Amazon S3?)

Amazon S3 is an abbreviation for the Amazon Storage Service in AWS cloud. AWS S3 provides IT teams, Developers a highly secure, durable storage with low latency on AWS cloud. It is basically an object storage service of AWS which can store and retrieve unlimited data from anywhere in the world.

Amazon S3是AWS云中Amazon Storage Service的缩写。 AWS S3为IT团队,开发人员提供了高度安全,持久的存储,并在AWS云上具有低延迟。 它基本上是AWS的对象存储服务,可以存储和检索来自世界任何地方的无限数据。

AWS S3 stores object within the S3 buckets. An object is consist of a file and the metadata (optional) of the file. For better understanding. you can think like it’s just the file storage in the AWS cloud. And that can keep additional information about your files.

AWS S3将对象存储在S3存储桶中 。 对象由文件和文件的元数据(可选)组成。 为了更好的理解。 您可以认为这只是AWS云中的文件存储。 这样可以保留有关文件的其他信息。

为什么选择Amazon S3? (Why Amazon S3?)

The first question comes in mind that there are several free storage spaces and services are available then why Amazon S3? Let me give plenty of reasons to support why the Amazon S3 is used by millions of cloud user across the world.

首先想到的一个问题是,有多个可用的存储空间和服务可用,那么为什么要使用Amazon S3? 让我给出很多理由来支持为何全球数百万云用户使用Amazon S3的原因。

Amazon S3 is intentionally built with the focus on simplicity and robustness with the very minimal feature set. In addition to that never forget the power of cloud computing and its scaling nature.

Amazon S3特意构建,着眼于简单性和健壮性,并具有极少的功能集。 除此之外,别忘了云计算的强大功能及其可扩展性。

Let’s discuss a few of the many features that Amazon S3 offers.

让我们讨论Amazon S3提供的众多功能中的一些。

可用的 (Available)

Like any other service, AWS S3 is also designed to be available at least 99.99%. You can also choose the AWS region and where to store your data. You can address the latency and optimized the cost by choosing the most suitable region where your services are used most.

与其他任何服务一样,AWS S3的可用率至少为99.99% 。 您还可以选择AWS区域以及存储数据的位置。 您可以通过选择最适合使用服务的最合适的区域来解决延迟并优化成本。

配置通知 (Configure Notifications)

This is perhaps the best thing with AWS S3. You can configure and enable the notification to send when objects are loaded into S3 buckets. AWS offers a variety of notifications like:

这也许是AWS S3最好的选择。 您可以配置并启用将对象加载到S3存储桶中时发送的通知。 AWS提供了各种通知,例如:

  1. SQS

    SQS
  2. Lambda Trigger

    Lambda触发器
  3. SNS

    社交网络

This way you can also set up the workflows for your object and files in Amazon S3. For example, When you upload an image to S3 a lambda function triggers which creates multiple sizes of uploaded image. And send an email to admin with the path of all images.

这样,您还可以在Amazon S3中为对象和文件设置工作流程。 例如,当您将图像上传到S3时,会触发lambda函数,该函数会创建多种尺寸的上传图像。 并向管理员发送所有图像的路径的电子邮件。

耐用 (Durable)

Amazon S3 is extremely durable and it provides 11 9s durability. That means if you upload a 1000 objects then data loss of 1 object may occur once in a 10,000,000 (a million) years.

Amazon S3非常耐用,它提供11 9s的耐用性 。 这意味着, 如果您上载1000个对象,则可能在10,000,000(百万)年中发生1个对象的数据丢失

AWS S3 stores the objects multiple availability zones.

AWS S3将对象存储在多个可用区中。

成本效益高 (Highly Cost Efficient)

It’s also very cost efficient. You can store a huge amount of data at a very low cost. You will only pay for what you use. Also, there are a variety of storage classes are available. You can choose the best storage class for your data.

它也非常具有成本效益。 您可以以非常低的成本存储大量数据。 您将只为使用的商品付费。 此外,还有多种存储类别可用。 您可以为数据选择最佳的存储类别。

S3 is also available in AWS free tier:

S3也可用于AWS免费套餐:

You can read our post on “Amazon Web Service (AWS)” to more about the cost model and free tier.

您可以阅读我们在“ Amazon Web Service(AWS) ”上的帖子,以了解有关成本模型和免费套餐的更多信息。

可扩展 (Scalable)

Unlike any other storage, Amazon S3 is also highly scalable. You can scale up or down as required.

与任何其他存储不同,Amazon S3也是高度可扩展的。 您可以根据需要放大或缩小。

与其他服务的整合 (Integration with Other Services)

Amazon S3 can be fully integrated with many services available on AWS. I can list some of them for you so that you can go and explore on AWS:

Amazon S3可以与AWS上的许多服务完全集成。 我可以为您列出其中的一些,以便您可以在AWS上进行探索:

  1. Amazon CloudFront

    亚马逊CloudFront
  2. Amazon CloudWatch

    亚马逊CloudWatch
  3. Amazon EBS

    亚马逊EBS
  4. Amazon RDS

    亚马逊RDS
  5. Lambda etc.

    Lambda等

Amazon S3用例 (Use Cases of Amazon S3)

Let’s take a look at some of the popular use cases of Amazon S3.

让我们看一下Amazon S3的一些流行用例。

备份与存档 (Backup & Archive)

Amazon S3 is ideal for backup and archiving. It can store a practically unlimited amount of data which is the basic requirement for backup and data archive.

Amazon S3是备份和归档的理想选择。 它可以存储几乎无限量的数据,这是备份和数据存档的基本要求。

Traditional IT infrastructure offers finite data storage capability. You have to manage the data backups and archives you will retain and what not. This is not a problem at all with the Amazon S3.

传统的IT基础架构提供有限的数据存储功能。 您必须管理将要保留的数据备份和归档,而不要保留。 Amazon S3根本不是问题。

大数据 (Big Data)

AWS S3 is not just designed to store the files, it can store really big objects. It can store photos, videos and financial data etc.

AWS S3不仅用于存储文件,还可以存储很大的对象。 它可以存储照片,视频和财务数据等。

Using AWS service you can perform the big data analytics on the data stored in Amazon S3.

使用AWS服务,您可以对Amazon S3中存储的数据执行大数据分析。

媒体托管 (Media Hosting)

It’s a very common use case of Amazon S3. You can store any kind of media hosting on S3 which includes video, photo, or music uploads and downloads.

这是Amazon S3的非常常见的用例。 您可以在S3上存储任何类型的媒体托管,包括视频,照片或音乐的上载和下载。

灾难恢复 (Disaster Recovery)

Another key use case of Amazon S3 is disaster recovery. For those who don’t know “Disaster recovery is the process of bringing back your site, data, application or infrastructure from any kind of server crash or data loss.”

Amazon S3的另一个关键用例是灾难恢复。 对于那些不知道“灾难恢复是指从任何类型的服务器崩溃或数据丢失中恢复站点,数据,应用程序或基础结构的过程。”

As I mentioned in the starting that all the data in Amazon S3 is stored and replicated in different availability zones. You also have an option to replicate it in other regions using cross-region replication. For point-in-time recovery, you can also store the multiple copies of the data.

正如我在开始时提到的那样,Amazon S3中的所有数据都存储在不同的可用区中并进行复制。 您还可以选择使用跨区域复制将其复制到其他区域。 对于时间点恢复,您还可以存储数据的多个副本。

内容存储与分发 (Content Storage & Distribution)

Amazon S3 is best for content storage and its distribution. You can upload your entire infrastructure into the cloud to minimize your cost drastically.

Amazon S3最适合内容存储及其分发。 您可以将整个基础架构上传到云中,以最大程度地降低成本。

You can make your content available directly to the end users. Amazon S3 is one of the sources to the Amazon CloudFront to provide data on edge locations. When we will talk about Amazon CloudFront then will see what value it adds on top of S3.

您可以将内容直接提供给最终用户。 Amazon S3是Amazon CloudFront提供边缘位置数据的来源之一。 当我们谈论Amazon CloudFront时,将看到它在S3之上增加了什么价值。

托管静态网站 (Host Static Website)

One of everyone’s favorite use case is to host a static website. Amazon S3 allows you to host an entire static website and on very low cost too.

每个人最喜欢的用例之一是托管一个静态网站。 Amazon S3允许您以非常低的成本托管整个静态网站。

Hosting a static website on Amazon S3 is a highly available and scalable hosting solution. I will post a separate topic on this.

在Amazon S3上托管静态网站是一种高度可用且可扩展的托管解决方案。 我将在此发布一个单独的主题。

亚马逊S3桶 (Amazon S3 Bucket)

AWS stores your data in S3 buckets. Amazon S3 is a globally unique name used by all AWS accounts. This means that once the bucket has been created then the name cannot be used by any other AWS account in any region.

AWS将您的数据存储在S3存储桶中。 Amazon S3是所有AWS账户使用的全局唯一名称。 这意味着一旦创建了存储桶,则该名称将不能被任何区域中的任何其他AWS账户使用。

AWS creates the bucket in the region you specify. You can choose the closest regions to you and your customer.

AWS在您指定的区域中创建存储桶。 您可以选择离您和您的客户最近的地区。

Ideally, you should not depend upon any specific naming convention or pattern to create an Amazon S3 bucket.

理想情况下,您不应依赖任何特定的命名约定或模式来创建Amazon S3存储桶。

命名规则和限制 (Name rules and limitations)

By default, you can create 100 buckets in an AWS account. You can increase this by submitting a service limit increase. There are several rules and limitations that you need to take care of:

默认情况下,您可以在一个AWS账户中创建100个存储桶。 您可以通过提交服务限制增加来增加此限制。 您需要注意一些规则和限制:

  • You cannot change the name of the bucket once created – Choose the name wisely.

    创建后,您将无法更改存储桶的名称–明智地选择名称。
  • Bucket name must be unique across all account and regions .

    存储桶名称在所有帐户和区域中必须唯一。
  • SInce you can host static website so bucket name must comply with all DNS naming conventions.

    由于您可以托管静态网站,因此存储桶名称必须符合所有DNS命名约定。
  • Bucket name must have at least 3 and maximum 63 characters.

    值区名称必须至少包含3个字符,最多63个字符。
  • Bucket name must start with lowercase letter or number.

    值区名称必须以小写字母或数字开头。
  • Bucket names must not be formatted as an IP address (for example, 127.0.0.1).

    存储桶名称不得格式化为IP地址(例如127.0.0.1)。
  • After March, 2018, Amazon do not support the uppercase letters and underscore in bucket names.

    在2018年3月之后,Amazon不支持存储桶名称中的大写字母和下划线。

If AWS does any change in the naming convention it communicates to its account holders well in advance.

如果AWS对命名约定进行了任何更改,它将提前与帐户持有人进行沟通。

Amazon S3对象 (Amazon S3 Object)

Amazon S3 stores the key and value pair as an object in buckets. An object in Amazon S3 typically consists of:

Amazon S3将键和值对作为对象存储在存储桶中。 Amazon S3中的对象通常包括:

  • Key – to uniquely identify an object in bucket

    密钥–唯一标识存储桶中的对象
  • Version ID – Amazon S3 generates version id when you upload and object.

    版本ID – Amazon S3在上载和对象时生成版本ID。
  • Value – The content that you are storing.

    价值–您要存储的内容。
  • Metadata – Information about the object in key value pair.

    元数据–有关键值对中对象的信息。
  • ACL – Access Control information of an object in Amazon S3 bucket.

    ACL – Amazon S3存储桶中对象的访问控制信息。

储存类别 (Storage Classes)

Amazon S3 provides 6 storage classes for different use cases. See below is a really comprehensive comparison of all the Amazon S3 storage classes.

Amazon S3为不同用例提供了6种存储类别。 下面是所有Amazon S3存储类的真正全面比较。

设置Amazon S3 (Setup Amazon S3)

Let’s get started with Amazon S3. In this exercise, we will create an S3 bucket and will store some objects into it.

让我们开始使用Amazon S3。 在本练习中,我们将创建一个S3存储桶并将一些对象存储到其中。

S3入门 (Get Started with S3)

To get started with Amazon S3, you must have an AWS account created and activated. If you are new then to AWS then please read my post on “Amazon Web Services (AWS)” to get started with AWS cloud.

要开始使用Amazon S3,您必须创建并激活一个AWS账户。 如果您不熟悉AWS,那么请阅读我在“ Amazon Web Services(AWS) ”上的文章,以开始使用AWS云。

  • Go to the https://aws.amazon.com/s3/ and choose to get started with Amazon S3 OR Go to services and search for S3.

    转到https://aws.amazon.com/s3/并选择开始使用Amazon S3或转到服务并搜索S3。
  • Follow the onscreen instructions

    按照屏幕上的说明进行操作

创建一个S3存储桶 (Create a S3 Bucket)

After click on the Amazon S3 link, you will see the below screen.

S3 View Bucket 2

单击Amazon S3链接后,您将看到以下屏幕。

Click on the button “Create Bucket”.

点击“创建存储桶”按钮。

Enter the bucket name and remember that this bucket name must be unique. See the rules and restrictions I described in the section above.

输入存储桶名称,并记住该存储桶名称必须唯一。 请参阅我在上一节中描述的规则和限制。

Click on the “Next” button and set config options & permission for your bucket:

单击“下一步”按钮,然后为您的存储桶设置配置选项和权限:

It’s highly recommended not to allow the public access to your S3 bucket.

强烈建议禁止公众访问您的S3存储桶。

Review the settings and the configurations you did. I’m creating an S3 bucket with the name “journaldev” in the closest region to me.

查看您所做的设置和配置。 我正在最靠近我的区域创建一个名称为“ journaldev”的S3存储桶。

查看桶 (View Bucket)

AWS will take a few seconds to create your S3 bucket. Once done, you will see that your bucket in the list. You can select the checkbox to see the properties. Also, you can change the ACL at any point in time.

AWS将花费几秒钟来创建您的S3存储桶。 完成后,您将在列表中看到您的存储桶。 您可以选中该复选框以查看属性。 另外,您可以随时更改ACL。

将对象添加到S3存储桶 (Add an Object to S3 Bucket)

Click on the name of your bucket to start uploading objects in your bucket. You can also create a folder in the S3 bucket. Let’s click on the “Upload” button.

单击存储桶的名称以开始在存储桶中上传对象。 您也可以在S3存储桶中创建一个文件夹。 让我们点击“上传”按钮。

Choose and upload a file. You can upload as many files as you want in one go. Please notice that Amazon S3 is not just uploading a file, it’s keeping other information like metadata, ACL, and properties etc. That is why we call it an object.

选择并上传文件。 您可以一次上传任意数量的文件。 请注意,Amazon S3不仅在上传文件,还在保留其他信息,例如元数据,ACL和属性等。这就是为什么我们称其为对象。

Click on the “Upload” button and your object has been uploaded.

单击“上传”按钮,您的对象已被上传。

查看物件 (View Object )

You can see the object has been uploaded to the S3 bucket you created.

您可以看到该对象已上传到您创建的S3存储桶中。

Click on the link to see the details of the object. You can make this object public by changing the ACL (Access Control Permissions).

单击链接以查看对象的详细信息。 您可以通过更改ACL(访问控制权限)来将此对象公开。

更改存储类别 (Change Storage Class)

Amazon S3 stores the objects in default storage i.e. Standard. There is an option to change the storage class if you want. I’m doing this just to show you the storage classes that we were talking about.

Amazon S3将对象存储默认存储中,即Standard 。 如果需要,可以选择更改存储类。 我这样做只是为了向您展示我们正在讨论的存储类。

You can choose the other storage classes and save the object.

您可以选择其他存储类并保存对象。

删除物件 (Delete Object)

Let’s delete the object from Amazon S3 bucket. Choose the option available from actions and delete the objects into a two-step process.

让我们从Amazon S3存储桶中删除对象。 从操作中选择可用选项,然后将对象删除到两步过程中。

Step 1: Choose the object to delete

步骤1:选择要删除的对象

Step 2: Confirm the object deletion

步骤2:确认对象删除

删除存储桶 (Delete Bucket)

Choose the bucket that you want to delete. As AWS mentioned in the note that you must think twice before deleting a bucket. The reason is bucket names are global and anybody else can pick that name after your deletion.

选择您要删除的存储桶。 正如AWS在笔记中提到的,删除存储桶之前必须三思。 原因是存储桶名称是全局名称,删除后其他任何人都可以选择该名称。

Stay tuned with us, we will post on How to host a static website on Amazon S3 with a very low hosting cost, with high availability and low-latency.

请继续关注我们,我们将在如何以较低的托管成本,高可用性和低延迟在Amazon S3上托管静态网站上发表文章。

翻译自: https://www.journaldev.com/25606/amazon-s3-aws-simple-storage-service

亚马逊aws服务取消

Logo

亚马逊云科技开发者 Build On 是由亚马逊团队策划、开发者社区联合打造的动手实操系列活动。

更多推荐