aws s3 静态网站
This article explores the AWS S3 bucket to configure a static website.
本文探讨了用于配置静态网站的AWS S3存储桶 。
介绍 (Introduction)
Amazon Web Services (AWS) has an object-level storage solution known as Simple Storage Service. We can store any kind of file in this cloud service. It gives you unlimited storage and a maximum of 5TB single file upload.
Amazon Web Services(AWS)有一个称为“ 简单存储服务”的对象级存储解决方案。 我们可以在此云服务中存储任何类型的文件。 它为您提供了无限的存储空间,最多可以上传5TB的单个文件。
In the articles listed below, we explored S3 bucket integration with AWS RDS SQL Server using the web console, and AWS CLI commands.
在下面列出的文章中,我们探索了使用Web控制台和AWS CLI命令与S3存储桶与AWS RDS SQL Server的集成。
- Integrating AWS S3 buckets with AWS RDS SQL Server将AWS S3存储桶与AWS RDS SQL Server集成
- Learn AWS CLI – Interact with AWS S3 Buckets using AWS CLI了解AWS CLI –使用AWS CLI与AWS S3存储桶进行交互
We can use s3 buckets for hosting a static website. In many cases, we do not require a dynamic website where data changes very frequently. For example, suppose you publish technical articles on SQL Server. It is a static website as users open the website and read the content. We can leverage the s3 bucket for hosting a static website using AWS serverless architecture.
我们可以使用s3存储桶来托管静态网站。 在很多情况下,我们并不需要动态数据频繁变化的网站。 例如,假设您在SQL Server上发布技术文章。 当用户打开网站并阅读内容时,它是一个静态网站。 我们可以利用s3存储桶来使用AWS无服务器架构托管静态网站。
Let’s start configuring the static website using the AWS S3 bucket.
让我们开始使用AWS S3存储桶配置静态网站。
AWS S3存储桶配置 (AWS S3 bucket configuration)
Logon to AWS web console and search for S3 service. It lists the existing buckets in your AWS account if any.
登录到AWS Web控制台并搜索S3服务。 它列出了您的AWS账户中现有的存储桶(如果有)。
Click on Create Bucket to configure a new s3 bucket that holds contents for our static website. Give a unique bucket name and choose the appropriate region to deploy your AWS resources.
单击创建存储桶以配置一个新的s3存储桶,其中包含我们静态网站的内容。 提供唯一的存储桶名称,然后选择适当的区域来部署您的AWS资源。
AWS does not allow public access for s3 bucket, by default. We need to edit this behavior for a static website. Click Next, and you see default behavior – Block all public access.
默认情况下,AWS不允许对s3存储桶进行公共访问。 我们需要为静态网站编辑此行为。 单击下一步,您将看到默认行为– 阻止所有公共访问。
Remove the tick from the block all public access. It also gives you a warning message, and you need to acknowledge that you operated intentionally.
删除所有公共访问权限中的对勾。 它还会向您发出警告消息,并且您需要确认自己是有意操作的。
Review the bucket configuration and click on Create bucket.
查看存储桶配置,然后单击“ 创建存储桶” 。
You can see the newly configured S3 bucket in the below screenshot.
您可以在以下屏幕截图中看到新配置的S3存储桶。