简体   繁体   English

使用s3存储桶设置一个子域

[英]Setup a subdomain with s3 bucket

I have purchased my domain from GoDaddy and using below AWS services to host the files: 我已从GoDaddy购买了域,并使用以下AWS服务托管文件:

  1. S3 S3
  2. CloudFront CloudFront的
  3. Route 53 53路
  4. IAM 我是
  5. Lambda LAMBDA
  6. SNS SNS
  7. SES SES

For example, I am using domain.com . 例如,我正在使用domain.com I have created a new S3 bucket and upload a single index.html file into that bucket. 我创建了一个新的S3存储桶 ,并将单个index.html文件上传到该存储桶。 Now I want to create a new subdomain v2.domain.com and point that domain to my newly created bucket. 现在,我想创建一个新的子域v2.domain.com并将该域指向我新创建的存储桶。

How can I setup? 如何设置?

Your Fully Qualified Subdomain name must be the same as the S3 bucket name. 您的完全限定子域名必须与S3存储桶名称相同。 So in Your case bucket name will be subdomainv2.domain.com 因此,在您的情况下,存储桶名称将为subdomainv2.domain.com

Once you name a new bucket as per your Sub Domain naming convention, you will have S3 URL assigned to it that looks something like http://subdomainv2.domain.com.s3-website-us-east-1.amazonaws.com. 根据您的“子域”命名约定命名新存储桶后,您将为其分配S3 URL,其外观类似于http://subdomainv2.domain.com.s3-website-us-east-1.amazonaws.com。

Now Next thing you need to do is to your domain host and map your subdomain to the URL from above step. 现在,您要做的下一步就是您的域名托管服务商,并将您的子域名映射到上述步骤中的URL。 where a mapping the host "subdomainv2" to the address "subdomainv2.mydomain.com.s3-website-us-east-1.amazonaws.com" as a CNAME record . 其中将主机“ subdomainv2”映射到地址“ subdomainv2.mydomain.com.s3-website-us-east-1.amazonaws.com”作为CNAME记录

You can also refer the following URL: Alias a Domain and Sub Domain S3 configuration 您还可以引用以下URL: 别名域和子域S3配置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM