SlideShare a Scribd company logo
1 of 31
Download to read offline
Getting Started Guide
AWS Static Website Hosting
Getting Started Guide AWS Static Website Hosting




Getting Started Guide: AWS Static Website Hosting
Copyright © 2011 Amazon Web Services LLC or its affiliates. All rights reserved.
Getting Started Guide AWS Static Website Hosting



Overview ................................................................................................................................................ 1
Getting Started ...................................................................................................................................... 4
Step 1: Sign Up for the Service .............................................................................................................. 4
Step 2: Create an Amazon S3 Bucket .................................................................................................... 5
Step 3: Create an Amazon CloudFront Distribution ............................................................................... 8
Step 4: Hosting Your Website ............................................................................................................... 13
Step 5: Clean Up .................................................................................................................................. 17
      Disable and Delete an Amazon CloudFront Distribution ............................................................ 17
      Delete Objects and an Amazon S3 Bucket ................................................................................. 18
Amazon Route 53 ................................................................................................................................ 19
Pricing .................................................................................................................................................. 20
Amazon S3 Cost Breakdown ............................................................................................................... 20
Amazon CloudFront Cost Breakdown ................................................................................................... 22
Summing It All Up ................................................................................................................................ 24
Related Resources ............................................................................................................................... 26
Document History ................................................................................................................................. 28




                                                                    3
Getting Started Guide AWS Static Website Hosting




Overview

  Suppose you want to build a website to offer static content such as product catalogs, images, and manuals
  to your customers. Amazon Web Services (AWS) has reliable, secure, scalable, and high-performance
  infrastructure upon which to store and host your website. It's easy to get started, and you can use the
  AWS Management Console to set up everything you need to host a static website.

  This guide walks through the process of using Amazon Simple Storage Service (Amazon S3) and Amazon
  CloudFront to host and deploy your website. It also gives you a variation, which uses Amazon Route 53,
  that you can use to provide secure and reliable routing. We’ll review an example architecture of a static
  website hosted on AWS, and we’ll walk through the process of deploying the website by using several
  key AWS services and following best practices. You can adapt this sample to your specific needs if you
  want. By the end of this walkthrough, you should be able to do the following:

  •   Sign up for AWS.
  •   Create a location to store static files for your website.
  •   Create a content delivery network.
  •   Clean up your AWS resources.


  If this guide is not exactly what you are looking for, you may want to check out the following documents:

  • About AWS - Provides information about AWS, with helpful links for leaning more.
  • Getting Started Guide: AWS Free Usage Tier - Provides information about how to get started with the
    free usage tier.
  • Getting Started Guide: AWS Computing Basics for Linux - Introduces you to several key AWS services
    and components—what these services are, why they are important, and how to use them. It also
    provides a simple example architecture on a Linux platform and walks you through a deployment that
    uses this architecture.
  • Getting Started Guide: AWS Computing Basics for Windows - Introduces you to several key AWS
    services and components—what these services are, why they are important, and how to use them. It
    also provides a simple example architecture on a Windows platform and walks you through a deployment
    that uses this architecture.
  • Amazon Elastic Compute Cloud Getting Started Guide - Provides information that helps you get started
    using Amazon EC2 instances.




                                                    1
Getting Started Guide AWS Static Website Hosting
                                      How Does AWS Help?



How Does AWS Help?
   If you are responsible for creating and deploying a static website, you'll face infrastructure challenges.
   Where will you store your files? How will you deliver your content? How will you ensure reliability and
   high performance for your website? To solve these challenges, AWS provides Amazon S3 and Amazon
   CloudFront for easy, seamless, and cost-effective solutions.

   Using Amazon S3, you can host your website files on the same fast, reliable, and secure infrastructure
   Amazon uses to run its global network of websites. Amazon S3 provides a highly durable and available
   store for a variety of content, ranging from your website's HTML files to media files. It allows you to offload
   your entire storage infrastructure onto the cloud, where you can take advantage of Amazon S3’s scalability
   and pay-as-you-go pricing to handle your storage needs.

   Amazon CloudFront is a web service for content delivery. It integrates with other Amazon Web Services
   to give you an easy way to distribute content to your website users with low latency, high data transfer
   speeds, and no commitments. Amazon CloudFront delivers your static and streaming content using a
   global network of edge locations. Requests for your files are automatically routed to the edge location
   with the lowest latency, so content is delivered with the best possible performance.

   Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service. It is
   designed to give developers and businesses an extremely reliable and cost effective way to route end
   users to websites by translating human readable names like www.example.com into the numeric IP
   addresses like 192.0.2.1 that computers use to connect to each other.

   The following table gives a brief overview of the Amazon services used in this Getting Started Guide.

    Challenges            Amazon Web Services                         Benefits

    Need a low-cost,      Amazon Simple Storage Service               Amazon Simple Storage service offers
    reliable online                                                   a low cost, highly reliable solution for
    storage web                                                       hosting static website content.
    service to host
    static website
    content.

    Need a content        Amazon CloudFront                           Amazon CloudFront speeds up the
    delivery network                                                  loading of streaming or downloaded
    (CDN) to provide                                                  static content by caching the content via
    low-latency, high                                                 a local edge cache at a location with the
    data transfer                                                     lowest latency.
    speeds so end
    users don't
    experience
    unnecessary
    delays.

    Developers and     Amazon Route 53                                Amazon Route 53 allows users to
    businesses need a                                                 access Internet websites by routing
    reliable and                                                      human-readable domain names to
    cost-effective way                                                numeric IP addresses.
    to route end users
    to Internet
    websites.




                                                   2
Getting Started Guide AWS Static Website Hosting
                               Static Website Hosting Architecture



Static Website Hosting Architecture
    The following diagram illustrates an example architecture of a static website using Amazon S3, Amazon
    CloudFront, and Amazon Route 53.




    Amazon S3 provides secure and cost-efficient storage for your static website files. Amazon CloudFront
    caches high volume content, allowing global customers to rapidly access your website. Amazon Route
    53 connects user requests to infrastructure running in AWS. For a step-by-step walkthrough of how to
    build out this architecture, see Getting Started (p. 4). This walkthrough will teach you how to do the
    following:

    •   Sign up for AWS.
    •   Create an Amazon S3 bucket and store files in the bucket.
    •   Create a CloudFront distribution.
    •   Clean up your AWS resources.


    For more information on how to use Amazon Route 53 in this architecture, see Amazon Route 53 (p. 19).




                                                  3
Getting Started Guide AWS Static Website Hosting
                                 Step 1: Sign Up for the Service




Getting Started

    Topics
     • Step 1: Sign Up for the Service (p. 4)
     • Step 2: Create an Amazon S3 Bucket (p. 5)
     • Step 3: Create an Amazon CloudFront Distribution (p. 8)
     • Step 4: Hosting Your Website (p. 13)
     • Step 5: Clean Up (p. 17)


    The following tasks will step you through how to deploy your static website using AWS. This walkthrough
    gives you an example that follows best practices and demonstrates how different AWS products work
    together to provide the solution you need.

            Note

            Typically, you would create an Amazon S3 website and make it public, and then set up your
            Amazon CloudFront distribution. However, since it takes a few minutes to deploy the Amazon
            CloudFront distribution, you will set up your distribution first before making your website public.



Step 1: Sign Up for the Service
    If you don't already have an AWS account, you’ll need to get one. Your AWS account gives you access
    to all services, but you will be charged only for the resources that you use. For this example walkthrough,
    the charges will be minimal.

    To sign up for AWS

    1.   Go to http://aws.amazon.com and click Sign Up Now.
    2.   Follow the on-screen instructions.


    AWS notifies you by email when your account is active and available for you to use.

    The credentials for your AWS account give you access to all the resources that you have deployed. If
    you give other people access to your resources, you will probably want to control who has access and
    what they can do. AWS Identity and Access Management (IAM) is a web service that controls access to




                                                  4
Getting Started Guide AWS Static Website Hosting
                                Step 2: Create an Amazon S3 Bucket


    your resources by other people. In IAM, you create a user, which other people can use to obtain access
    and permissions that you define. For more information about IAM, go to What Can I Do with IAM?



Step 2: Create an Amazon S3 Bucket
    Amazon Simple Storage Service (Amazon S3) is a perfect solution for storing objects for your static
    website, such as photos, HTML pages, and documentation. Using Amazon S3, you can easily store and
    retrieve as many files as you like. For your static website, you can store files you are working on and only
    make public files you want your customers to see.

    In Amazon S3, storage is redundant across multiple data centers. This provides very reliable durability
    for only a few cents per gigabyte per month. Your files are stored in Amazon S3 as objects, and every
    object is stored in a bucket. Before we can store data in Amazon S3 we must create a bucket.

             Note

             You are not charged for creating a bucket; you are only charged for storing objects and for
             transferring objects in and out of the bucket. The charges you will incur for following this example
             are minimal. For more information, go to Amazon S3 Pricing.


    Amazon S3 lets you configure a bucket to be an Amazon S3 website. When you configure your Amazon
    S3 bucket as a website, you can utilize advanced website features, such as index and custom error
    document support.

    In this step you will do the following:

    • Create an Amazon S3 bucket for static content
    • Configure your Amazon S3 bucket as a website
    • Enable logging for your Amazon S3 bucket


    To create a bucket to contain static content for your website

    1.   Open the Amazon S3 console at https://console.aws.amazon.com/s3/.
    2.   In the Amazon S3 console, click Create Bucket.
         The Create a Bucket dialog box appears.
    3.   Enter a bucket name in the Bucket Name field.
         The bucket name you choose must be unique across all existing bucket names in Amazon S3. One
         way to do that is to prefix your bucket names with your company's name. For this example, we'll use
         staticwebsite-example, however you should choose a unique name.
         Your bucket name must comply with Amazon S3 requirements. There might be additional restrictions
         on bucket names based on the region your bucket is in or how you intend to access the object. For
         more information, go to Bucket Restrictions and Limitations.




                                                   5
Getting Started Guide AWS Static Website Hosting
                           Step 2: Create an Amazon S3 Bucket




             Note

             After you create a bucket, you cannot change its name. In addition, the bucket name is
             visible in the URL that points to the objects stored in the bucket. Make sure the bucket name
             you choose is appropriate.


4.   In the Region drop-down list box, select a region.
     By default, Amazon S3 creates buckets in the US Standard region.You can choose a region to lower
     latency (usually the closest region), minimize costs, or address regulatory requirements. Objects
     stored in a region never leave that region unless you explicitly transfer them to another region. For
     more information about regions, go to Regions and Endpoints.
5.   Click Create.
     When Amazon S3 successfully creates your bucket, the console displays your empty bucket in the
     Buckets panel.




For more information about Amazon S3, go to Amazon Simple Storage Service documentation.

Now that you have created a bucket, let's configure the bucket to be a website.

To configure your Amazon S3 bucket as a website

1.   In the Amazon S3 console, right-click the bucket you created and select Properties.
     The Properties pane appears.
2.   Click the Website tab.
3.   Click the Enabled check box.



                                              6
Getting Started Guide AWS Static Website Hosting
                           Step 2: Create an Amazon S3 Bucket


4.   Enter index.html in the Index Document field.
     Enter error.html in the Error Document field.

             Note

             These files do not exist yet.You will create and upload these files to your Amazon S3 bucket
             in a later step.


5.   Click Save to configure the Amazon S3 bucket as a website.




For more information about configuring your Amazon S3 bucket as a website, go to Hosting Websites on
Amazon S3.

Now that you've set up your bucket as a website, let's enable logging for your bucket.

You might want to see the activity your Amazon S3 bucket is getting. Amazon S3 provides a way to enable
logging on your buckets. With logging enabled, you can track information such as data in and out of your
bucket and the IP addresses of who is accessing your bucket.

To enable logging for your bucket

1.   In the Amazon S3 console, right-click the bucket you created and select Properties.
     The Properties pane appears.
2.   In the Properties pane:

     • Click the Logging tab.
     • Click the Enabled check box.
     • Select the Amazon S3 bucket you just created from the Target Bucket drop-down list.

               Note

               You can create and select any Amazon S3 bucket to exclusively contain your log files.
               For the purpose of this example, you will use the same bucket to contain your log files
               and static website data.


     • Enter staticwebsite-example/ in the Target Prefix field.
     • Click Save to enable logging.




                                             7
Getting Started Guide AWS Static Website Hosting
                                        Where You're At




        Normally, you would upload your content and set permissions after this step. For this example you
        will wait until you deploy your website to do this step.



    Where You're At
    Here's where you are at in building out your architecture.




    If the people who come to your website encounter significant latency, their experience will be less than
    par. Amazon CloudFront is a good solution if you need to consider performance.
    In the next step you'll create an Amazon CloudFront distribution.



Step 3: Create an Amazon CloudFront
Distribution
    Amazon CloudFront is an AWS content delivery service that helps you improve the performance, reliability,
    and availability of your websites and applications. If you intend for your website to be hit multiple times
    a day or have a global presence, Amazon CloudFront provides the infrastructure to quickly deliver your
    website content to customers anywhere in the world.

    Amazon CloudFront works by distributing your web content (such as images, video, and so on) using a
    network of edge locations around the world. Your content is served from your configured Amazon S3
    bucket or custom origin to the edge location that has the lowest latency to the user who requests it.

    For more information about Amazon CloudFront, go to the Amazon CloudFront Developer Guide.

    The content you deliver with Amazon CloudFront will be stored on a server referred to as an origin server.
    In this example, our origin is our staticwebsite-example bucket where our static content is stored.
    Let's create our Amazon CloudFront distribution.

            Note

            This is an optional step. You can skip this step and continue to Step 4: Hosting Your Website
            (p. 13).


    Before creating an Amazon CloudFront distribution, you'll need to locate and copy down the endpoint for
    your Amazon S3 website.




                                                  8
Getting Started Guide AWS Static Website Hosting
                   Step 3: Create an Amazon CloudFront Distribution


To locate the endpoint for your Amazon S3 website

1.   In the Amazon S3 console, right-click your bucket and select Properties. The Properties pane
     appears.
2.   Click the Website tab to locate your Amazon S3 website's endpoint.


To create a distribution with an Amazon S3 origin, we will use the AWS Management Console.

To create an Amazon CloudFront distribution

1.   Open the Amazon CloudFront console at https://console.aws.amazon.com/cloudfront/.
2.   In the Amazon CloudFront console, click Create Distribution.




3.   In the Create Distribution Wizard, do the following:

     • Click Download for the Delivery Method.
     • Click Custom Origin. Enter your origin DNS name for your Amazon S3 website in the Origin DNS
       Name field.
       Your origin DNS name will be the same as your Amazon S3 website's endpoint, but without http://
       and the trailing /.

               Note

               When creating a distribution for an Amazon S3 bucket configured as a website, you must
               specify a custom origin. When creating a distribution for any other bucket, click Amazon
               S3 Origin to specify the bucket.




                                             9
Getting Started Guide AWS Static Website Hosting
                    Step 3: Create an Amazon CloudFront Distribution




4.   Click Continue. For the purpose of this walkthrough, you'll leave the other options as their defaults.
5.   On the DISTRIBUTION DETAILS page, specify the following details:

     a.   In Allowed Connections, select HTTP and HTTPS.
     b.   Leave the CNAMEs field blank.

                  Note

                  The Canonical Name Record (CNAME) is a type of resource record used by the DNS
                  to specify that one domain name is the alias of another, canonical domain name. By
                  specifying a CNAME, you give permission to allow traffic from the CNAME to access
                  your CloudFront distribution.
                  When configuring your distribution, you have the option of providing CNAMEs for your
                  distribution. However, for the purposes of this tutorial you will not do this. For more
                  information, go to Using CNAMEs.


     c.   If you want to use a default root object with your distribution, enter the default root object to
          associate with the distribution in the Default Root Object field. For this example, specify
          index.html as your default root object. We will create and add this file to your Amazon S3
          bucket later.
     d.   If you want to enable logging for your distribution, for Logging click On. Next, you can either
          select or specify the Amazon S3 bucket where you want to save your logs. For this example,
          we select staticwebsite-example; you should select the bucket that you created. Specify
          the log file prefix in the Log Prefix field. For this example, we use staticwebsite-example/;
          you should specify a prefix from the name of the bucket that you created.
     e.   In Comments, you can enter any comments you want to include about the distribution. We will
          leave this blank for this example.




                                               10
Getting Started Guide AWS Static Website Hosting
                    Step 3: Create an Amazon CloudFront Distribution


     f.   For the Distribution Status, select Enabled if you want the distribution to accept end-user
          requests for content as soon as it is deployed. Otherwise, if you prefer to enable the distribution
          later, choose Disabled. For this example, select Enabled.

                  Note

                  Even if the distribution's status is Deployed, you still must enable the distribution for
                  use before end users can retrieve content.




6.   To review your distribution settings, click Continue.
7.   If you are satisfied with the distribution settings, click Create Distribution in the REVIEW dialog box.




                                               11
Getting Started Guide AWS Static Website Hosting
                                     Where You're At




After creating the distribution, it might take a few minutes for the distribution to deploy. The distribution's
current status is displayed in the console under Status. A status of InProgress indicates that the distribution
is not yet fully deployed.




When your distribution is deployed, you are ready to reference your content with your new Amazon
CloudFront domain name or CNAME.


Where You're At
Here's where you are at in building out your architecture.




Your Amazon CloudFront distribution takes a few minutes to deploy. While you are waiting for the
distribution to be deployed, let's move on to the next topic where you will host your website files.



                                               12
Getting Started Guide AWS Static Website Hosting
                                    Step 4: Hosting Your Website



Step 4: Hosting Your Website
    Now that you've created an Amazon S3 bucket and created a Amazon CloudFront distribution, you are
    ready to upload your website files.

    Before uploading any files, you'll need to create a root HTML file and an error HTML file for your website.
    Create these files on your computer and name them index.html and error.html.To test your website,
    you will add simple HTML to the files.

    Add the following HTML to index.html:




    <html>
      <body>
        <p>
           Hello, World!
        </p>
      </body>
    </html>



    Add the following HTML to error.html:




    <html>
      <body>
        <p>
           This is an error page.
        </p>
      </body>
    </html>



    Save these files on your computer in a location you can easily locate.

    In this step you will do the following:

    • Upload your static website files to your Amazon S3 bucket
    • Set public permissions for your website content


    To upload your website files to your Amazon S3 bucket

    1.
    2.   In the Amazon S3 console, select the bucket you previously created to contain your static website
         files. In our example, we will select staticwebsite-example bucket.
    3.   Click Upload. The Upload - Select Files dialog box appears.




                                                  13
Getting Started Guide AWS Static Website Hosting
                              Step 4: Hosting Your Website




4.   Click Add Files.
5.   In the file dialog box, select the index.html and error.html files you created. Click Start Upload
     to upload your file to your Amazon S3 bucket.


When your files have finished uploading, they will appear in the Objects and Folders panel for your
bucket.




                                            14
Getting Started Guide AWS Static Website Hosting
                               Step 4: Hosting Your Website


        Note

        When objects are uploaded to Amazon S3 buckets, they lose the file system hierarchy found on
        your local computer or on a server. You will have to change all file references in your HTML,
        such as references to images, to use the URL of the files in Amazon S3.
        To locate the URL of any object uploaded to an Amazon S3 bucket, right-click the object and
        select Properties. Locate the URL in the Properties pane under the Details tab.


After you have uploaded your index.html and error.html files, you can add any other files you want
to use for your website. None of these files are publicly viewable until you set public permissions in the
AWS Management Console.

You can set the public permissions for the files all at once, or set public permissions per file. When
deploying your static website, you might want to test each file to ensure that it works before making them
public.

To set public permissions

1.   In the Objects and Folders panel for your Amazon S3 bucket, right-click the files you want to make
     public.

             Tip

             You can use the SHIFT and CRTL keys to select multiple objects and folders to perform the
             same action on them simultaneously.


2.   Select Make Public.
3.   In the message box, click OK.
     It can take a few seconds for the permissions to be set by Amazon S3.




             Note

             If your CloudFront distribution finished deploying before you made your files public, then you
             may see a 403-Forbidden error. It can take up to 5 minutes for your files to be viewable.




Your website is now publicly viewable. In your Internet browser, navigate to your website through its
Amazon S3 address or through your Amazon CloudFront distribution URL.

To locate the address of your Amazon S3 website

1.   In the Amazon S3 console, right-click your bucket and select Properties. The Properties pane
     appears.




                                             15
Getting Started Guide AWS Static Website Hosting
                              Step 4: Hosting Your Website


2.   Click the Website tab to locate your Amazon S3 website address. Your website address is under
     Endpoint.




To locate the address of your Amazon CloudFront distribution

•    In the Amazon CloudFront console, select your Amazon CloudFront distribution. Your Amazon
     CloudFront address is listed in the lower pane under Domain Name.




        Note

        Changes made to objects in your Amazon S3 bucket are not immediately cached through your
        Amazon CloudFront distribution. The default time-to-live (TTL) is 24 hours. You can change this
        value by setting the Expires metadata property on your Amazon S3 object; the minimum TTL is
        1 hour.




                                            16
Getting Started Guide AWS Static Website Hosting
                                         Step 5: Clean Up


    You can also test to see if your custom error page works by entering a bogus path after your Amazon S3
    website or Amazon CloudFront distribution URL. If your website is correctly deployed, you'll be redirected
    to your custom error page.

    Congratulations! You have deployed your website using AWS! Continue to customize your website, and
    track website activity through the logs created in your Amazon S3 bucket.

    To avoid accruing additional charges for your billable services, you will clean up your AWS resources in
    the next step.



Step 5: Clean Up
    Topics
     • Disable and Delete an Amazon CloudFront Distribution (p. 17)
     • Delete Objects and an Amazon S3 Bucket (p. 18)


    Now that you've learned how to deploy a static website, it's time to terminate your environment, clean up
    your resources, and avoid accruing any further charges.


    Disable and Delete an Amazon CloudFront
    Distribution
    An Amazon CloudFront distribution can be disabled or deleted. A disabled distribution is no longer
    functional and you will no longer be charged, but it can be enabled again at any time. A deleted distribution
    is no longer accessible and is lost forever.

    If you created an Amazon CloudFront distribution in the previous steps, you will need to first disable the
    distribution and then delete it.

    To disable an Amazon CloudFront distribution

    1.   Open the Amazon CloudFront console at https://console.aws.amazon.com/cloudfront/.
    2.   Select a distribution and click Disable.

         A confirmation dialog box appears.
    3.   Click Yes, Disable.

         Amazon CloudFront disables the distribution.


    To delete an Amazon CloudFront distribution

    1.   Select a disabled distribution and click Delete.

         A confirmation dialog box appears.
    2.   Click Yes, Delete.

         Amazon CloudFront deletes the distribution.




                                                  17
Getting Started Guide AWS Static Website Hosting
                         Delete Objects and an Amazon S3 Bucket



Delete Objects and an Amazon S3 Bucket
Buckets with objects in them cannot be deleted. Before deleting a bucket, all objects within the bucket
must be deleted.

You should also ensure that logging for your Amazon S3 bucket is disabled. Otherwise, logs might be
immediately written to your bucket after you delete your bucket's objects.

To disable logging

1.   Open the Amazon S3 console at https://console.aws.amazon.com/s3/.
2.   Right-click your bucket and select Properties. The Properties pane appears.
3.   Click the Logging tab.
4.   Deselect the Enabled check box to disable logging.


To delete an object

1.   Open the Amazon S3 console at https://console.aws.amazon.com/s3/.
2.   Click the bucket where the objects are stored.
3.   Right-click the object you want to delete.
     A dialog box shows the actions you can take on the selected object(s).

              Tip

              You can use the SHIFT and CRTL keys to select multiple objects and perform the same
              action on them simultaneously.


4.   Click Delete.
5.   Confirm the deletion when the console prompts you to.


To delete a bucket, you must first delete all of the objects in it.

To delete a bucket

1.   Right-click the bucket you want to delete.
     A dialog box shows the actions you can take on the selected bucket.
2.   Click Delete.
3.   Confirm the deletion when the console prompts you to.


You have now deleted your bucket and all its contents.




                                                18
Getting Started Guide AWS Static Website Hosting




Amazon Route 53

  AWS provides flexible services, and there are many variations you can use to host your static website.
  In this section, we'll discuss using Amazon Route 53 with your static website.

  Amazon Route 53 is a scalable Domain Name System (DNS) web service. It provides secure and reliable
  routing to your infrastructure that uses Amazon Web Services, such as Amazon Simple Storage Service
  (Amazon S3). You can also use Amazon Route 53 to route users to your infrastructure outside of AWS.

  Amazon Route 53 automatically routes queries to the nearest DNS server in a global network of DNS
  servers, resulting in low latency. It is an authoritative DNS service, meaning it translates friendly domain
  names like www.example.com into IP addresses such as 192.0.2.1.

  You can manage your DNS records through the Amazon Route 53 API, or set account-level user and
  access management through the AWS Identity and Access Management (IAM) API. Like other AWS
  products, there are no contracts or minimum commitments for using Amazon Route 53. You pay only for
  the domains you configure and the number of queries that the service answers. For more information
  about Amazon Route 53 pricing, go to Amazon Route 53 Pricing.

  The following procedure explains the high-level steps you need to take to use Route 53 for this example.
  For more information on how to use Amazon Route 53, go to the Amazon Route 53 Getting Started Guide.
  For instructions on how to route queries to a website that is hosted in an Amazon S3 bucket (not using
  Amazon CloudFront), go to Routing Queries to a Website That Is Hosted in an Amazon S3 Bucket in the
  Amazon Route 53 Developer Guide.

  To use Amazon Route 53

  1.   Create a hosted zone for example.com.
  2.   Create a new DNS record for your website (e.g., www.example.com) that points to your Amazon
       CloudFront distribution (e.g., d18k4jybr69gw2.cloudfront.net). Check with your domain name registrar
       for instructions on creating a new DNS record.
  3.   Confirm your requests are complete.
  4.   Update the registrar's name server records.

               Note

               Make sure you update the CNAME for the Amazon CloudFront distribution if you haven’t
               already set it.




                                                19
Getting Started Guide AWS Static Website Hosting
                                  Amazon S3 Cost Breakdown




Pricing

    Topics
     • Amazon S3 Cost Breakdown (p. 20)
     • Amazon CloudFront Cost Breakdown (p. 22)
     • Summing It All Up (p. 24)


    The AWS Simple Monthly Calculator estimates your monthly bill. It provides a per-service cost breakdown,
    as well as an aggregate monthly estimate. You can also use the calculator to see an estimate and
    breakdown of costs for common solutions. This topic walks you through an example of using the AWS
    Simple Monthly Calculator to estimate your monthly bill.

            Note

            AWS pricing you see in this documentation is current at the time of publication. For the latest
            pricing information, go to AWS Service Pricing Overview . For more information on how AWS
            pricing works, go to How AWS Pricing Works.



Amazon S3 Cost Breakdown
    The following table shows the characteristics for Amazon S3 we have identified for this static website
    hosting architecture.

     Characteristic                    Metric                             Description

     Storage                           0.001 GB/month                     20 JPEG files (objects) @ 50 KB
                                                                          = 1 MB

                                                                          Total of 1.0 MB for 20 objects =
                                                                          0.001 GB




                                                 20
Getting Started Guide AWS Static Website Hosting
                             Amazon S3 Cost Breakdown



Characteristic                   Metric                                  Description

Requests                         PUT requests: 20/month                  We will plan to update the objects
                                                                         twice a month. 1 PUT request *
                                 GET requests: 2000/month                20 objects = 20 requests

                                                                         (PUT requests include from any
                                                                         location including Amazon EC2)

                                                                         We will transfer the objects 10
                                                                         times per month to each of the 10
                                                                         Amazon CloudFront edge
                                                                         locations. 10 GET requests * 10
                                                                         CloudFront Nodes * 20 objects =
                                                                         2000 requests

                                                                         (GET requests include from any
                                                                         location including Amazon EC2)

Data Transfer                    Data out: 0.1 GB/month                  If the average size object is 50
                                                                         KB, and we make about 2000
                                                                         requests per month, then the
                                                                         average data transfer is
                                                                         approximately 0.1 GB.


The following image shows the cost breakdown for Amazon S3 in the AWS Simple Monthly Calculator.




Variable                                                  Formula                              Calculation

Provisioned Storage                                  Storage rate                                   $0.125

                                          x Storage Amount (GB)                                     x 0.001

                                                ----------------------                                -------

                                                                                                     $0.00




                                          21
Getting Started Guide AWS Static Website Hosting
                                 Amazon CloudFront Cost Breakdown



    Variable                                                          Formula                               Calculation

    PUT Requests                                               Request Rate                                           $0.01

                                         x Number of requests (per 1000)                                                x1

                                                  -------------------------------                                      -----

                                                                                                                      $0.01

    GET Requests                                               Request Rate                                           $0.01

                                              x Number of requests (per                                                 x1
                                                               10000)
                                                                                                                       -----
                                                  --------------------------------
                                                                                                                      $0.01


    We use the AWS Simple Monthly calculator to estimate this. With the calculator, the total cost for Amazon
    S3 is $0.02.



Amazon CloudFront Cost Breakdown
    The following table shows the characteristics for Amazon CloudFront we have identified for this web
    application hosting architecture.

    Characteristic                       Metric                                      Description

    Traffic Distribution                 50% US                                      Distribution of traffic across
                                                                                     regions
                                         25% EU

                                         10% HK

                                         15% JP

                                         0% SA

    Request Type                         HTTP                                        Type of requests that customers
                                                                                     make to the cached locations

    Data Transfer Out                    30.0 GB/month                               1.0 MB x 30.5 days x 1,000
                                                                                     hits/day


    The following image shows the cost breakdown for Amazon CloudFront in the AWS Simple Monthly
    Calculator.




                                                   22
Getting Started Guide AWS Static Website Hosting
                         Amazon CloudFront Cost Breakdown




The total monthly cost is the sum of the data transfer out plus the requests costs for each of the regions.

 Variable                                                        Formula                     Calculation

 Data Transfer Out for US                      Monthly Volume (GB)                                  30.00

                                              Traffic Distribution (%)                               0.50

                                                       x Data Out Rate                             x 0.12

                                                   --------------------------                        ------

                                                                                                    $1.80

 Data Transfer Out for EU                      Monthly Volume (GB)                                  30.00

                                              Traffic Distribution (%)                               0.25

                                                       x Data Out Rate                             x 0.12

                                                   --------------------------                        ------

                                                                                                    $0.90

 Data Transfer Out for                         Monthly Volume (GB)                                  30.00
 HK/Singapore
                                              Traffic Distribution (%)                               0.10

                                                       x Data Out Rate                             x 0.19

                                                   --------------------------                        ------

                                                                                                    $0.57




                                              23
Getting Started Guide AWS Static Website Hosting
                                       Summing It All Up



    Variable                                                                Formula                      Calculation

    Data Transfer Out for JP                            Monthly Volume (GB)                                       30.00

                                                       Traffic Distribution (%)                                     0.15

                                                                x Data Out Rate                                 x 0.201

                                                           --------------------------                              -------

                                                                                                                  $0.90

    Requests for US                                                 Request Rate                               $0.0075

                                                       Traffic Distribution (%)                                     0.50

                                         x (Monthly Volume/Object Size                          x (30 GB/50 KB/10K)
                                                 (per 10,000 requests))
                                                                                                      --------------------
                                       ----------------------------------------------------
                                                                                                                  $0.24

    Requests for EU                                                 Request Rate                                $0.009

                                                       Traffic Distribution (%)                                     0.25

                                         x (Monthly Volume/Object Size                        x (30.00 GB/50 KB/10K)
                                                 (per 10,000 requests))
                                                                                                      --------------------
                                       ----------------------------------------------------
                                                                                                                  $0.15

    Requests for HK/Singapore                                       Request Rate                               $0.0075

                                                       Traffic Distribution (%)                                     0.10

                                         x (Monthly Volume/Object Size                        x (30.00 GB/50 KB/10K)
                                                 (per 10,000 requests))
                                                                                                      --------------------
                                       ----------------------------------------------------
                                                                                                                  $0.05

    Requests for JP                                                 Request Rate                               $0.0095

                                                       Traffic Distribution (%)                                     0.15

                                         x (Monthly Volume/Object Size                        x (30.00 GB/50 KB/10K)
                                                 (per 10,000 requests))
                                                                                                      --------------------
                                       ----------------------------------------------------
                                                                                                                  $0.09


    We use the AWS Simple Monthly calculator to estimate this. With the calculator, the total cost for Amazon
    CloudFront is $4.70.



Summing It All Up
    To calculate the total cost for this scenario, we add the cost for Amazon S3, Amazon CloudFront and the
    AWS Data Transfer Out, and subtract any discount that falls into the AWS Free Usage Tier.



                                                      24
Getting Started Guide AWS Static Website Hosting
                                    Summing It All Up


The total AWS Transfer Out is an aggregate Data Transfer Out usage across Amazon S3 and any other
Amazon services you might use. For Amazon S3, we have 0.1 GB per month. Since up to 1 GB per month
of data transferred out is free, there is no charge.

The following image shows an example of your monthly estimate.




The total cost of this static website is estimated at $4.72.




                                               25
Getting Started Guide AWS Static Website Hosting




Related Resources

   The following table lists related resources that you'll find useful as you work with AWS services.

    Resource                                  Description

    AWS Products and Services                 A comprehensive list of products and services AWS offers.

    Documentation                             Official documentation for each AWS product including service
                                              introductions, service features, and API references, and other
                                              useful information.

    AWS Architecture Center                   Provides the necessary guidance and best practices to build
                                              highly scalable and reliable applications in the AWS cloud.
                                              These resources help you understand the AWS platform, its
                                              services and features. They also provide architectural
                                              guidance for design and implementation of systems that run
                                              on the AWS infrastructure.

    AWS Economics Center                      Provides access to information, tools, and resources to
                                              compare the costs of Amazon Web Services with IT
                                              infrastructure alternatives.

    AWS Developer Resource Centers            From here, you will find links to developer centers that provide
                                              documentation, code samples, release notes, and other
                                              information to help you build innovative applications with AWS.

    AWS Cloud Computing Whitepapers           Features a comprehensive list of technical AWS whitepapers
                                              covering topics such as architecture, security, and economics.
                                              These whitepapers have been authored either by the Amazon
                                              team or by AWS customers or solution providers.

    Videos and Webinars                       Previously recorded webinars and videos about products,
                                              architecture, security, and more.

    Discussion Forums                         A community-based forum for developers to discuss technical
                                              questions related to Amazon Web Services.

    AWS Support Center                        The home page for AWS Technical Support, including access
                                              to our Developer Forums, Technical FAQs, Service Status
                                              page, and AWS Premium Support. (subscription required).




                                                26
Getting Started Guide AWS Static Website Hosting




Resource                                Description

AWS Premium Support Information         The primary web page for information about AWS Premium
                                        Support, a one-on-one, fast-response support channel to help
                                        you build and run applications on AWS Infrastructure Services.

Form for questions related to your AWS This form is only for account questions. For technical
account: Contact Us                    questions, use the Discussion Forums.

Conditions of Use                       Detailed information about the copyright and trademark usage
                                        at Amazon.com and other topics.




                                           27
Getting Started Guide AWS Static Website Hosting




Document History

   This document history is associated with the 2011-10-07 release of: Getting Started Guide: AWS Static
   Website Hosting. This guide was last updated on March 19, 2012.

   Change                  Description                                                   Release Date

   New content             Created new document.                                         07 October
                                                                                         2011




                                              28

More Related Content

What's hot

Workshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECSWorkshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECSAmazon Web Services
 
AWS Webinar - Design for Availability-13_09_10
AWS Webinar - Design for Availability-13_09_10AWS Webinar - Design for Availability-13_09_10
AWS Webinar - Design for Availability-13_09_10Amazon Web Services
 
Aws+cloud+practitioner+exam+cram
Aws+cloud+practitioner+exam+cramAws+cloud+practitioner+exam+cram
Aws+cloud+practitioner+exam+cramVishnu Sure
 
Aws interview questions and answers
Aws interview questions and answersAws interview questions and answers
Aws interview questions and answerskavinilavuG
 
AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...
AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...
AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...Simplilearn
 
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015Amazon Web Services Korea
 
AWS TEchnical Essentials Workshop
AWS TEchnical Essentials Workshop AWS TEchnical Essentials Workshop
AWS TEchnical Essentials Workshop Muhammad Usman Khan
 
Amazon web services quick guide - tutorialspoint
Amazon web services   quick guide - tutorialspointAmazon web services   quick guide - tutorialspoint
Amazon web services quick guide - tutorialspointVishnu Sure
 
Aws certified-solutions-architect-associate-training
Aws certified-solutions-architect-associate-trainingAws certified-solutions-architect-associate-training
Aws certified-solutions-architect-associate-trainingCloudsara
 
Overview of Amazon Web Services
Overview of Amazon Web ServicesOverview of Amazon Web Services
Overview of Amazon Web ServicesHarish Ganesan
 
Basic introduction of Amazon Web Services (AWS)
Basic introduction of Amazon Web Services (AWS)Basic introduction of Amazon Web Services (AWS)
Basic introduction of Amazon Web Services (AWS)One That Matters
 
Aws overview part 1(iam and storage services)
Aws overview   part 1(iam and storage services)Aws overview   part 1(iam and storage services)
Aws overview part 1(iam and storage services)Parag Patil
 
AWS Virtual Private Cloud
AWS Virtual Private CloudAWS Virtual Private Cloud
AWS Virtual Private CloudWhizlabs
 

What's hot (20)

AWSome Day - Rio de Janeiro - Brasil
AWSome Day - Rio de Janeiro - BrasilAWSome Day - Rio de Janeiro - Brasil
AWSome Day - Rio de Janeiro - Brasil
 
Cost Optimisation
Cost OptimisationCost Optimisation
Cost Optimisation
 
Workshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECSWorkshop: Deploy a Deep Learning Framework on Amazon ECS
Workshop: Deploy a Deep Learning Framework on Amazon ECS
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
AWS Webinar - Design for Availability-13_09_10
AWS Webinar - Design for Availability-13_09_10AWS Webinar - Design for Availability-13_09_10
AWS Webinar - Design for Availability-13_09_10
 
Aws+cloud+practitioner+exam+cram
Aws+cloud+practitioner+exam+cramAws+cloud+practitioner+exam+cram
Aws+cloud+practitioner+exam+cram
 
Aws interview questions and answers
Aws interview questions and answersAws interview questions and answers
Aws interview questions and answers
 
AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...
AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...
AWS Interview Questions Part - 2 | AWS Interview Questions And Answers Part -...
 
AWS Elastic Compute Cloud (EC2)
AWS Elastic Compute Cloud (EC2) AWS Elastic Compute Cloud (EC2)
AWS Elastic Compute Cloud (EC2)
 
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
오토스케일링 제대로 활용하기 (김일호) - AWS 웨비나 시리즈 2015
 
AWS TEchnical Essentials Workshop
AWS TEchnical Essentials Workshop AWS TEchnical Essentials Workshop
AWS TEchnical Essentials Workshop
 
Technical Track
Technical TrackTechnical Track
Technical Track
 
Amazon web services quick guide - tutorialspoint
Amazon web services   quick guide - tutorialspointAmazon web services   quick guide - tutorialspoint
Amazon web services quick guide - tutorialspoint
 
Aws certified-solutions-architect-associate-training
Aws certified-solutions-architect-associate-trainingAws certified-solutions-architect-associate-training
Aws certified-solutions-architect-associate-training
 
AWS 101 Event - 16 July 2013
AWS 101 Event - 16 July 2013AWS 101 Event - 16 July 2013
AWS 101 Event - 16 July 2013
 
AWS 101 Event London - Feb 2014
AWS 101 Event London - Feb 2014AWS 101 Event London - Feb 2014
AWS 101 Event London - Feb 2014
 
Overview of Amazon Web Services
Overview of Amazon Web ServicesOverview of Amazon Web Services
Overview of Amazon Web Services
 
Basic introduction of Amazon Web Services (AWS)
Basic introduction of Amazon Web Services (AWS)Basic introduction of Amazon Web Services (AWS)
Basic introduction of Amazon Web Services (AWS)
 
Aws overview part 1(iam and storage services)
Aws overview   part 1(iam and storage services)Aws overview   part 1(iam and storage services)
Aws overview part 1(iam and storage services)
 
AWS Virtual Private Cloud
AWS Virtual Private CloudAWS Virtual Private Cloud
AWS Virtual Private Cloud
 

Similar to Awsgsg swh

Running your First Application on AWS
Running your First Application on AWSRunning your First Application on AWS
Running your First Application on AWSAmazon Web Services
 
AWS_Basics_By_Aadarsh_Sharan
AWS_Basics_By_Aadarsh_SharanAWS_Basics_By_Aadarsh_Sharan
AWS_Basics_By_Aadarsh_SharanAadarsh Sharan
 
Aws web-hosting-best-practices
Aws web-hosting-best-practicesAws web-hosting-best-practices
Aws web-hosting-best-practicessaifam
 
AWS Summit Sydney 2014 | Running your First Application on AWS
AWS Summit Sydney 2014 | Running your First Application on AWSAWS Summit Sydney 2014 | Running your First Application on AWS
AWS Summit Sydney 2014 | Running your First Application on AWSAmazon Web Services
 
Running your First Application on AWS
Running your First Application on AWS Running your First Application on AWS
Running your First Application on AWS Amazon Web Services
 
Aws big picture_overview
Aws big picture_overviewAws big picture_overview
Aws big picture_overviewAjay Bidari
 
AWS Summit Auckland 2014 | Running your First Application on AWS
AWS Summit Auckland 2014 | Running your First Application on AWSAWS Summit Auckland 2014 | Running your First Application on AWS
AWS Summit Auckland 2014 | Running your First Application on AWSAmazon Web Services
 
Aws storage services whitepaper v9
Aws storage services whitepaper v9Aws storage services whitepaper v9
Aws storage services whitepaper v9saifam
 
Aws overview (Amazon Web Services)
Aws overview (Amazon Web Services)Aws overview (Amazon Web Services)
Aws overview (Amazon Web Services)Jatinder Randhawa
 
Aws storage services whitepaper v9
Aws storage services whitepaper v9Aws storage services whitepaper v9
Aws storage services whitepaper v9Victor Insunza
 
Awsgsg wah-linux
Awsgsg wah-linuxAwsgsg wah-linux
Awsgsg wah-linuxSebin John
 
Website on aws
Website on awsWebsite on aws
Website on awsmydatasync
 
Aw some day_essentials3.2ish_072214
Aw some day_essentials3.2ish_072214Aw some day_essentials3.2ish_072214
Aw some day_essentials3.2ish_072214Amazon Web Services
 
Cloud computing - Compute,Storage,Networking & Security
Cloud computing - Compute,Storage,Networking & SecurityCloud computing - Compute,Storage,Networking & Security
Cloud computing - Compute,Storage,Networking & SecurityNantha Kumar Rajasekaren
 

Similar to Awsgsg swh (20)

Running your First Application on AWS
Running your First Application on AWSRunning your First Application on AWS
Running your First Application on AWS
 
AMAZON CLOUD Course Content
AMAZON CLOUD Course ContentAMAZON CLOUD Course Content
AMAZON CLOUD Course Content
 
AWS_Basics_By_Aadarsh_Sharan
AWS_Basics_By_Aadarsh_SharanAWS_Basics_By_Aadarsh_Sharan
AWS_Basics_By_Aadarsh_Sharan
 
Awsgsg wah
Awsgsg wahAwsgsg wah
Awsgsg wah
 
Aws web-hosting-best-practices
Aws web-hosting-best-practicesAws web-hosting-best-practices
Aws web-hosting-best-practices
 
AWS Summit Sydney 2014 | Running your First Application on AWS
AWS Summit Sydney 2014 | Running your First Application on AWSAWS Summit Sydney 2014 | Running your First Application on AWS
AWS Summit Sydney 2014 | Running your First Application on AWS
 
AWS Architecting In The Cloud
AWS Architecting In The CloudAWS Architecting In The Cloud
AWS Architecting In The Cloud
 
Aws
AwsAws
Aws
 
Amazon web services aws
Amazon web services awsAmazon web services aws
Amazon web services aws
 
Running your First Application on AWS
Running your First Application on AWS Running your First Application on AWS
Running your First Application on AWS
 
Aws big picture_overview
Aws big picture_overviewAws big picture_overview
Aws big picture_overview
 
AWS Summit Auckland 2014 | Running your First Application on AWS
AWS Summit Auckland 2014 | Running your First Application on AWSAWS Summit Auckland 2014 | Running your First Application on AWS
AWS Summit Auckland 2014 | Running your First Application on AWS
 
Aws storage services whitepaper v9
Aws storage services whitepaper v9Aws storage services whitepaper v9
Aws storage services whitepaper v9
 
Aws overview (Amazon Web Services)
Aws overview (Amazon Web Services)Aws overview (Amazon Web Services)
Aws overview (Amazon Web Services)
 
Aws storage services whitepaper v9
Aws storage services whitepaper v9Aws storage services whitepaper v9
Aws storage services whitepaper v9
 
Awsgsg wah-linux
Awsgsg wah-linuxAwsgsg wah-linux
Awsgsg wah-linux
 
Website on aws
Website on awsWebsite on aws
Website on aws
 
Aw some day_essentials3.2ish_072214
Aw some day_essentials3.2ish_072214Aw some day_essentials3.2ish_072214
Aw some day_essentials3.2ish_072214
 
Cloud computing - Compute,Storage,Networking & Security
Cloud computing - Compute,Storage,Networking & SecurityCloud computing - Compute,Storage,Networking & Security
Cloud computing - Compute,Storage,Networking & Security
 
Aws
AwsAws
Aws
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Awsgsg swh

  • 1. Getting Started Guide AWS Static Website Hosting
  • 2. Getting Started Guide AWS Static Website Hosting Getting Started Guide: AWS Static Website Hosting Copyright © 2011 Amazon Web Services LLC or its affiliates. All rights reserved.
  • 3. Getting Started Guide AWS Static Website Hosting Overview ................................................................................................................................................ 1 Getting Started ...................................................................................................................................... 4 Step 1: Sign Up for the Service .............................................................................................................. 4 Step 2: Create an Amazon S3 Bucket .................................................................................................... 5 Step 3: Create an Amazon CloudFront Distribution ............................................................................... 8 Step 4: Hosting Your Website ............................................................................................................... 13 Step 5: Clean Up .................................................................................................................................. 17 Disable and Delete an Amazon CloudFront Distribution ............................................................ 17 Delete Objects and an Amazon S3 Bucket ................................................................................. 18 Amazon Route 53 ................................................................................................................................ 19 Pricing .................................................................................................................................................. 20 Amazon S3 Cost Breakdown ............................................................................................................... 20 Amazon CloudFront Cost Breakdown ................................................................................................... 22 Summing It All Up ................................................................................................................................ 24 Related Resources ............................................................................................................................... 26 Document History ................................................................................................................................. 28 3
  • 4. Getting Started Guide AWS Static Website Hosting Overview Suppose you want to build a website to offer static content such as product catalogs, images, and manuals to your customers. Amazon Web Services (AWS) has reliable, secure, scalable, and high-performance infrastructure upon which to store and host your website. It's easy to get started, and you can use the AWS Management Console to set up everything you need to host a static website. This guide walks through the process of using Amazon Simple Storage Service (Amazon S3) and Amazon CloudFront to host and deploy your website. It also gives you a variation, which uses Amazon Route 53, that you can use to provide secure and reliable routing. We’ll review an example architecture of a static website hosted on AWS, and we’ll walk through the process of deploying the website by using several key AWS services and following best practices. You can adapt this sample to your specific needs if you want. By the end of this walkthrough, you should be able to do the following: • Sign up for AWS. • Create a location to store static files for your website. • Create a content delivery network. • Clean up your AWS resources. If this guide is not exactly what you are looking for, you may want to check out the following documents: • About AWS - Provides information about AWS, with helpful links for leaning more. • Getting Started Guide: AWS Free Usage Tier - Provides information about how to get started with the free usage tier. • Getting Started Guide: AWS Computing Basics for Linux - Introduces you to several key AWS services and components—what these services are, why they are important, and how to use them. It also provides a simple example architecture on a Linux platform and walks you through a deployment that uses this architecture. • Getting Started Guide: AWS Computing Basics for Windows - Introduces you to several key AWS services and components—what these services are, why they are important, and how to use them. It also provides a simple example architecture on a Windows platform and walks you through a deployment that uses this architecture. • Amazon Elastic Compute Cloud Getting Started Guide - Provides information that helps you get started using Amazon EC2 instances. 1
  • 5. Getting Started Guide AWS Static Website Hosting How Does AWS Help? How Does AWS Help? If you are responsible for creating and deploying a static website, you'll face infrastructure challenges. Where will you store your files? How will you deliver your content? How will you ensure reliability and high performance for your website? To solve these challenges, AWS provides Amazon S3 and Amazon CloudFront for easy, seamless, and cost-effective solutions. Using Amazon S3, you can host your website files on the same fast, reliable, and secure infrastructure Amazon uses to run its global network of websites. Amazon S3 provides a highly durable and available store for a variety of content, ranging from your website's HTML files to media files. It allows you to offload your entire storage infrastructure onto the cloud, where you can take advantage of Amazon S3’s scalability and pay-as-you-go pricing to handle your storage needs. Amazon CloudFront is a web service for content delivery. It integrates with other Amazon Web Services to give you an easy way to distribute content to your website users with low latency, high data transfer speeds, and no commitments. Amazon CloudFront delivers your static and streaming content using a global network of edge locations. Requests for your files are automatically routed to the edge location with the lowest latency, so content is delivered with the best possible performance. Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web service. It is designed to give developers and businesses an extremely reliable and cost effective way to route end users to websites by translating human readable names like www.example.com into the numeric IP addresses like 192.0.2.1 that computers use to connect to each other. The following table gives a brief overview of the Amazon services used in this Getting Started Guide. Challenges Amazon Web Services Benefits Need a low-cost, Amazon Simple Storage Service Amazon Simple Storage service offers reliable online a low cost, highly reliable solution for storage web hosting static website content. service to host static website content. Need a content Amazon CloudFront Amazon CloudFront speeds up the delivery network loading of streaming or downloaded (CDN) to provide static content by caching the content via low-latency, high a local edge cache at a location with the data transfer lowest latency. speeds so end users don't experience unnecessary delays. Developers and Amazon Route 53 Amazon Route 53 allows users to businesses need a access Internet websites by routing reliable and human-readable domain names to cost-effective way numeric IP addresses. to route end users to Internet websites. 2
  • 6. Getting Started Guide AWS Static Website Hosting Static Website Hosting Architecture Static Website Hosting Architecture The following diagram illustrates an example architecture of a static website using Amazon S3, Amazon CloudFront, and Amazon Route 53. Amazon S3 provides secure and cost-efficient storage for your static website files. Amazon CloudFront caches high volume content, allowing global customers to rapidly access your website. Amazon Route 53 connects user requests to infrastructure running in AWS. For a step-by-step walkthrough of how to build out this architecture, see Getting Started (p. 4). This walkthrough will teach you how to do the following: • Sign up for AWS. • Create an Amazon S3 bucket and store files in the bucket. • Create a CloudFront distribution. • Clean up your AWS resources. For more information on how to use Amazon Route 53 in this architecture, see Amazon Route 53 (p. 19). 3
  • 7. Getting Started Guide AWS Static Website Hosting Step 1: Sign Up for the Service Getting Started Topics • Step 1: Sign Up for the Service (p. 4) • Step 2: Create an Amazon S3 Bucket (p. 5) • Step 3: Create an Amazon CloudFront Distribution (p. 8) • Step 4: Hosting Your Website (p. 13) • Step 5: Clean Up (p. 17) The following tasks will step you through how to deploy your static website using AWS. This walkthrough gives you an example that follows best practices and demonstrates how different AWS products work together to provide the solution you need. Note Typically, you would create an Amazon S3 website and make it public, and then set up your Amazon CloudFront distribution. However, since it takes a few minutes to deploy the Amazon CloudFront distribution, you will set up your distribution first before making your website public. Step 1: Sign Up for the Service If you don't already have an AWS account, you’ll need to get one. Your AWS account gives you access to all services, but you will be charged only for the resources that you use. For this example walkthrough, the charges will be minimal. To sign up for AWS 1. Go to http://aws.amazon.com and click Sign Up Now. 2. Follow the on-screen instructions. AWS notifies you by email when your account is active and available for you to use. The credentials for your AWS account give you access to all the resources that you have deployed. If you give other people access to your resources, you will probably want to control who has access and what they can do. AWS Identity and Access Management (IAM) is a web service that controls access to 4
  • 8. Getting Started Guide AWS Static Website Hosting Step 2: Create an Amazon S3 Bucket your resources by other people. In IAM, you create a user, which other people can use to obtain access and permissions that you define. For more information about IAM, go to What Can I Do with IAM? Step 2: Create an Amazon S3 Bucket Amazon Simple Storage Service (Amazon S3) is a perfect solution for storing objects for your static website, such as photos, HTML pages, and documentation. Using Amazon S3, you can easily store and retrieve as many files as you like. For your static website, you can store files you are working on and only make public files you want your customers to see. In Amazon S3, storage is redundant across multiple data centers. This provides very reliable durability for only a few cents per gigabyte per month. Your files are stored in Amazon S3 as objects, and every object is stored in a bucket. Before we can store data in Amazon S3 we must create a bucket. Note You are not charged for creating a bucket; you are only charged for storing objects and for transferring objects in and out of the bucket. The charges you will incur for following this example are minimal. For more information, go to Amazon S3 Pricing. Amazon S3 lets you configure a bucket to be an Amazon S3 website. When you configure your Amazon S3 bucket as a website, you can utilize advanced website features, such as index and custom error document support. In this step you will do the following: • Create an Amazon S3 bucket for static content • Configure your Amazon S3 bucket as a website • Enable logging for your Amazon S3 bucket To create a bucket to contain static content for your website 1. Open the Amazon S3 console at https://console.aws.amazon.com/s3/. 2. In the Amazon S3 console, click Create Bucket. The Create a Bucket dialog box appears. 3. Enter a bucket name in the Bucket Name field. The bucket name you choose must be unique across all existing bucket names in Amazon S3. One way to do that is to prefix your bucket names with your company's name. For this example, we'll use staticwebsite-example, however you should choose a unique name. Your bucket name must comply with Amazon S3 requirements. There might be additional restrictions on bucket names based on the region your bucket is in or how you intend to access the object. For more information, go to Bucket Restrictions and Limitations. 5
  • 9. Getting Started Guide AWS Static Website Hosting Step 2: Create an Amazon S3 Bucket Note After you create a bucket, you cannot change its name. In addition, the bucket name is visible in the URL that points to the objects stored in the bucket. Make sure the bucket name you choose is appropriate. 4. In the Region drop-down list box, select a region. By default, Amazon S3 creates buckets in the US Standard region.You can choose a region to lower latency (usually the closest region), minimize costs, or address regulatory requirements. Objects stored in a region never leave that region unless you explicitly transfer them to another region. For more information about regions, go to Regions and Endpoints. 5. Click Create. When Amazon S3 successfully creates your bucket, the console displays your empty bucket in the Buckets panel. For more information about Amazon S3, go to Amazon Simple Storage Service documentation. Now that you have created a bucket, let's configure the bucket to be a website. To configure your Amazon S3 bucket as a website 1. In the Amazon S3 console, right-click the bucket you created and select Properties. The Properties pane appears. 2. Click the Website tab. 3. Click the Enabled check box. 6
  • 10. Getting Started Guide AWS Static Website Hosting Step 2: Create an Amazon S3 Bucket 4. Enter index.html in the Index Document field. Enter error.html in the Error Document field. Note These files do not exist yet.You will create and upload these files to your Amazon S3 bucket in a later step. 5. Click Save to configure the Amazon S3 bucket as a website. For more information about configuring your Amazon S3 bucket as a website, go to Hosting Websites on Amazon S3. Now that you've set up your bucket as a website, let's enable logging for your bucket. You might want to see the activity your Amazon S3 bucket is getting. Amazon S3 provides a way to enable logging on your buckets. With logging enabled, you can track information such as data in and out of your bucket and the IP addresses of who is accessing your bucket. To enable logging for your bucket 1. In the Amazon S3 console, right-click the bucket you created and select Properties. The Properties pane appears. 2. In the Properties pane: • Click the Logging tab. • Click the Enabled check box. • Select the Amazon S3 bucket you just created from the Target Bucket drop-down list. Note You can create and select any Amazon S3 bucket to exclusively contain your log files. For the purpose of this example, you will use the same bucket to contain your log files and static website data. • Enter staticwebsite-example/ in the Target Prefix field. • Click Save to enable logging. 7
  • 11. Getting Started Guide AWS Static Website Hosting Where You're At Normally, you would upload your content and set permissions after this step. For this example you will wait until you deploy your website to do this step. Where You're At Here's where you are at in building out your architecture. If the people who come to your website encounter significant latency, their experience will be less than par. Amazon CloudFront is a good solution if you need to consider performance. In the next step you'll create an Amazon CloudFront distribution. Step 3: Create an Amazon CloudFront Distribution Amazon CloudFront is an AWS content delivery service that helps you improve the performance, reliability, and availability of your websites and applications. If you intend for your website to be hit multiple times a day or have a global presence, Amazon CloudFront provides the infrastructure to quickly deliver your website content to customers anywhere in the world. Amazon CloudFront works by distributing your web content (such as images, video, and so on) using a network of edge locations around the world. Your content is served from your configured Amazon S3 bucket or custom origin to the edge location that has the lowest latency to the user who requests it. For more information about Amazon CloudFront, go to the Amazon CloudFront Developer Guide. The content you deliver with Amazon CloudFront will be stored on a server referred to as an origin server. In this example, our origin is our staticwebsite-example bucket where our static content is stored. Let's create our Amazon CloudFront distribution. Note This is an optional step. You can skip this step and continue to Step 4: Hosting Your Website (p. 13). Before creating an Amazon CloudFront distribution, you'll need to locate and copy down the endpoint for your Amazon S3 website. 8
  • 12. Getting Started Guide AWS Static Website Hosting Step 3: Create an Amazon CloudFront Distribution To locate the endpoint for your Amazon S3 website 1. In the Amazon S3 console, right-click your bucket and select Properties. The Properties pane appears. 2. Click the Website tab to locate your Amazon S3 website's endpoint. To create a distribution with an Amazon S3 origin, we will use the AWS Management Console. To create an Amazon CloudFront distribution 1. Open the Amazon CloudFront console at https://console.aws.amazon.com/cloudfront/. 2. In the Amazon CloudFront console, click Create Distribution. 3. In the Create Distribution Wizard, do the following: • Click Download for the Delivery Method. • Click Custom Origin. Enter your origin DNS name for your Amazon S3 website in the Origin DNS Name field. Your origin DNS name will be the same as your Amazon S3 website's endpoint, but without http:// and the trailing /. Note When creating a distribution for an Amazon S3 bucket configured as a website, you must specify a custom origin. When creating a distribution for any other bucket, click Amazon S3 Origin to specify the bucket. 9
  • 13. Getting Started Guide AWS Static Website Hosting Step 3: Create an Amazon CloudFront Distribution 4. Click Continue. For the purpose of this walkthrough, you'll leave the other options as their defaults. 5. On the DISTRIBUTION DETAILS page, specify the following details: a. In Allowed Connections, select HTTP and HTTPS. b. Leave the CNAMEs field blank. Note The Canonical Name Record (CNAME) is a type of resource record used by the DNS to specify that one domain name is the alias of another, canonical domain name. By specifying a CNAME, you give permission to allow traffic from the CNAME to access your CloudFront distribution. When configuring your distribution, you have the option of providing CNAMEs for your distribution. However, for the purposes of this tutorial you will not do this. For more information, go to Using CNAMEs. c. If you want to use a default root object with your distribution, enter the default root object to associate with the distribution in the Default Root Object field. For this example, specify index.html as your default root object. We will create and add this file to your Amazon S3 bucket later. d. If you want to enable logging for your distribution, for Logging click On. Next, you can either select or specify the Amazon S3 bucket where you want to save your logs. For this example, we select staticwebsite-example; you should select the bucket that you created. Specify the log file prefix in the Log Prefix field. For this example, we use staticwebsite-example/; you should specify a prefix from the name of the bucket that you created. e. In Comments, you can enter any comments you want to include about the distribution. We will leave this blank for this example. 10
  • 14. Getting Started Guide AWS Static Website Hosting Step 3: Create an Amazon CloudFront Distribution f. For the Distribution Status, select Enabled if you want the distribution to accept end-user requests for content as soon as it is deployed. Otherwise, if you prefer to enable the distribution later, choose Disabled. For this example, select Enabled. Note Even if the distribution's status is Deployed, you still must enable the distribution for use before end users can retrieve content. 6. To review your distribution settings, click Continue. 7. If you are satisfied with the distribution settings, click Create Distribution in the REVIEW dialog box. 11
  • 15. Getting Started Guide AWS Static Website Hosting Where You're At After creating the distribution, it might take a few minutes for the distribution to deploy. The distribution's current status is displayed in the console under Status. A status of InProgress indicates that the distribution is not yet fully deployed. When your distribution is deployed, you are ready to reference your content with your new Amazon CloudFront domain name or CNAME. Where You're At Here's where you are at in building out your architecture. Your Amazon CloudFront distribution takes a few minutes to deploy. While you are waiting for the distribution to be deployed, let's move on to the next topic where you will host your website files. 12
  • 16. Getting Started Guide AWS Static Website Hosting Step 4: Hosting Your Website Step 4: Hosting Your Website Now that you've created an Amazon S3 bucket and created a Amazon CloudFront distribution, you are ready to upload your website files. Before uploading any files, you'll need to create a root HTML file and an error HTML file for your website. Create these files on your computer and name them index.html and error.html.To test your website, you will add simple HTML to the files. Add the following HTML to index.html: <html> <body> <p> Hello, World! </p> </body> </html> Add the following HTML to error.html: <html> <body> <p> This is an error page. </p> </body> </html> Save these files on your computer in a location you can easily locate. In this step you will do the following: • Upload your static website files to your Amazon S3 bucket • Set public permissions for your website content To upload your website files to your Amazon S3 bucket 1. 2. In the Amazon S3 console, select the bucket you previously created to contain your static website files. In our example, we will select staticwebsite-example bucket. 3. Click Upload. The Upload - Select Files dialog box appears. 13
  • 17. Getting Started Guide AWS Static Website Hosting Step 4: Hosting Your Website 4. Click Add Files. 5. In the file dialog box, select the index.html and error.html files you created. Click Start Upload to upload your file to your Amazon S3 bucket. When your files have finished uploading, they will appear in the Objects and Folders panel for your bucket. 14
  • 18. Getting Started Guide AWS Static Website Hosting Step 4: Hosting Your Website Note When objects are uploaded to Amazon S3 buckets, they lose the file system hierarchy found on your local computer or on a server. You will have to change all file references in your HTML, such as references to images, to use the URL of the files in Amazon S3. To locate the URL of any object uploaded to an Amazon S3 bucket, right-click the object and select Properties. Locate the URL in the Properties pane under the Details tab. After you have uploaded your index.html and error.html files, you can add any other files you want to use for your website. None of these files are publicly viewable until you set public permissions in the AWS Management Console. You can set the public permissions for the files all at once, or set public permissions per file. When deploying your static website, you might want to test each file to ensure that it works before making them public. To set public permissions 1. In the Objects and Folders panel for your Amazon S3 bucket, right-click the files you want to make public. Tip You can use the SHIFT and CRTL keys to select multiple objects and folders to perform the same action on them simultaneously. 2. Select Make Public. 3. In the message box, click OK. It can take a few seconds for the permissions to be set by Amazon S3. Note If your CloudFront distribution finished deploying before you made your files public, then you may see a 403-Forbidden error. It can take up to 5 minutes for your files to be viewable. Your website is now publicly viewable. In your Internet browser, navigate to your website through its Amazon S3 address or through your Amazon CloudFront distribution URL. To locate the address of your Amazon S3 website 1. In the Amazon S3 console, right-click your bucket and select Properties. The Properties pane appears. 15
  • 19. Getting Started Guide AWS Static Website Hosting Step 4: Hosting Your Website 2. Click the Website tab to locate your Amazon S3 website address. Your website address is under Endpoint. To locate the address of your Amazon CloudFront distribution • In the Amazon CloudFront console, select your Amazon CloudFront distribution. Your Amazon CloudFront address is listed in the lower pane under Domain Name. Note Changes made to objects in your Amazon S3 bucket are not immediately cached through your Amazon CloudFront distribution. The default time-to-live (TTL) is 24 hours. You can change this value by setting the Expires metadata property on your Amazon S3 object; the minimum TTL is 1 hour. 16
  • 20. Getting Started Guide AWS Static Website Hosting Step 5: Clean Up You can also test to see if your custom error page works by entering a bogus path after your Amazon S3 website or Amazon CloudFront distribution URL. If your website is correctly deployed, you'll be redirected to your custom error page. Congratulations! You have deployed your website using AWS! Continue to customize your website, and track website activity through the logs created in your Amazon S3 bucket. To avoid accruing additional charges for your billable services, you will clean up your AWS resources in the next step. Step 5: Clean Up Topics • Disable and Delete an Amazon CloudFront Distribution (p. 17) • Delete Objects and an Amazon S3 Bucket (p. 18) Now that you've learned how to deploy a static website, it's time to terminate your environment, clean up your resources, and avoid accruing any further charges. Disable and Delete an Amazon CloudFront Distribution An Amazon CloudFront distribution can be disabled or deleted. A disabled distribution is no longer functional and you will no longer be charged, but it can be enabled again at any time. A deleted distribution is no longer accessible and is lost forever. If you created an Amazon CloudFront distribution in the previous steps, you will need to first disable the distribution and then delete it. To disable an Amazon CloudFront distribution 1. Open the Amazon CloudFront console at https://console.aws.amazon.com/cloudfront/. 2. Select a distribution and click Disable. A confirmation dialog box appears. 3. Click Yes, Disable. Amazon CloudFront disables the distribution. To delete an Amazon CloudFront distribution 1. Select a disabled distribution and click Delete. A confirmation dialog box appears. 2. Click Yes, Delete. Amazon CloudFront deletes the distribution. 17
  • 21. Getting Started Guide AWS Static Website Hosting Delete Objects and an Amazon S3 Bucket Delete Objects and an Amazon S3 Bucket Buckets with objects in them cannot be deleted. Before deleting a bucket, all objects within the bucket must be deleted. You should also ensure that logging for your Amazon S3 bucket is disabled. Otherwise, logs might be immediately written to your bucket after you delete your bucket's objects. To disable logging 1. Open the Amazon S3 console at https://console.aws.amazon.com/s3/. 2. Right-click your bucket and select Properties. The Properties pane appears. 3. Click the Logging tab. 4. Deselect the Enabled check box to disable logging. To delete an object 1. Open the Amazon S3 console at https://console.aws.amazon.com/s3/. 2. Click the bucket where the objects are stored. 3. Right-click the object you want to delete. A dialog box shows the actions you can take on the selected object(s). Tip You can use the SHIFT and CRTL keys to select multiple objects and perform the same action on them simultaneously. 4. Click Delete. 5. Confirm the deletion when the console prompts you to. To delete a bucket, you must first delete all of the objects in it. To delete a bucket 1. Right-click the bucket you want to delete. A dialog box shows the actions you can take on the selected bucket. 2. Click Delete. 3. Confirm the deletion when the console prompts you to. You have now deleted your bucket and all its contents. 18
  • 22. Getting Started Guide AWS Static Website Hosting Amazon Route 53 AWS provides flexible services, and there are many variations you can use to host your static website. In this section, we'll discuss using Amazon Route 53 with your static website. Amazon Route 53 is a scalable Domain Name System (DNS) web service. It provides secure and reliable routing to your infrastructure that uses Amazon Web Services, such as Amazon Simple Storage Service (Amazon S3). You can also use Amazon Route 53 to route users to your infrastructure outside of AWS. Amazon Route 53 automatically routes queries to the nearest DNS server in a global network of DNS servers, resulting in low latency. It is an authoritative DNS service, meaning it translates friendly domain names like www.example.com into IP addresses such as 192.0.2.1. You can manage your DNS records through the Amazon Route 53 API, or set account-level user and access management through the AWS Identity and Access Management (IAM) API. Like other AWS products, there are no contracts or minimum commitments for using Amazon Route 53. You pay only for the domains you configure and the number of queries that the service answers. For more information about Amazon Route 53 pricing, go to Amazon Route 53 Pricing. The following procedure explains the high-level steps you need to take to use Route 53 for this example. For more information on how to use Amazon Route 53, go to the Amazon Route 53 Getting Started Guide. For instructions on how to route queries to a website that is hosted in an Amazon S3 bucket (not using Amazon CloudFront), go to Routing Queries to a Website That Is Hosted in an Amazon S3 Bucket in the Amazon Route 53 Developer Guide. To use Amazon Route 53 1. Create a hosted zone for example.com. 2. Create a new DNS record for your website (e.g., www.example.com) that points to your Amazon CloudFront distribution (e.g., d18k4jybr69gw2.cloudfront.net). Check with your domain name registrar for instructions on creating a new DNS record. 3. Confirm your requests are complete. 4. Update the registrar's name server records. Note Make sure you update the CNAME for the Amazon CloudFront distribution if you haven’t already set it. 19
  • 23. Getting Started Guide AWS Static Website Hosting Amazon S3 Cost Breakdown Pricing Topics • Amazon S3 Cost Breakdown (p. 20) • Amazon CloudFront Cost Breakdown (p. 22) • Summing It All Up (p. 24) The AWS Simple Monthly Calculator estimates your monthly bill. It provides a per-service cost breakdown, as well as an aggregate monthly estimate. You can also use the calculator to see an estimate and breakdown of costs for common solutions. This topic walks you through an example of using the AWS Simple Monthly Calculator to estimate your monthly bill. Note AWS pricing you see in this documentation is current at the time of publication. For the latest pricing information, go to AWS Service Pricing Overview . For more information on how AWS pricing works, go to How AWS Pricing Works. Amazon S3 Cost Breakdown The following table shows the characteristics for Amazon S3 we have identified for this static website hosting architecture. Characteristic Metric Description Storage 0.001 GB/month 20 JPEG files (objects) @ 50 KB = 1 MB Total of 1.0 MB for 20 objects = 0.001 GB 20
  • 24. Getting Started Guide AWS Static Website Hosting Amazon S3 Cost Breakdown Characteristic Metric Description Requests PUT requests: 20/month We will plan to update the objects twice a month. 1 PUT request * GET requests: 2000/month 20 objects = 20 requests (PUT requests include from any location including Amazon EC2) We will transfer the objects 10 times per month to each of the 10 Amazon CloudFront edge locations. 10 GET requests * 10 CloudFront Nodes * 20 objects = 2000 requests (GET requests include from any location including Amazon EC2) Data Transfer Data out: 0.1 GB/month If the average size object is 50 KB, and we make about 2000 requests per month, then the average data transfer is approximately 0.1 GB. The following image shows the cost breakdown for Amazon S3 in the AWS Simple Monthly Calculator. Variable Formula Calculation Provisioned Storage Storage rate $0.125 x Storage Amount (GB) x 0.001 ---------------------- ------- $0.00 21
  • 25. Getting Started Guide AWS Static Website Hosting Amazon CloudFront Cost Breakdown Variable Formula Calculation PUT Requests Request Rate $0.01 x Number of requests (per 1000) x1 ------------------------------- ----- $0.01 GET Requests Request Rate $0.01 x Number of requests (per x1 10000) ----- -------------------------------- $0.01 We use the AWS Simple Monthly calculator to estimate this. With the calculator, the total cost for Amazon S3 is $0.02. Amazon CloudFront Cost Breakdown The following table shows the characteristics for Amazon CloudFront we have identified for this web application hosting architecture. Characteristic Metric Description Traffic Distribution 50% US Distribution of traffic across regions 25% EU 10% HK 15% JP 0% SA Request Type HTTP Type of requests that customers make to the cached locations Data Transfer Out 30.0 GB/month 1.0 MB x 30.5 days x 1,000 hits/day The following image shows the cost breakdown for Amazon CloudFront in the AWS Simple Monthly Calculator. 22
  • 26. Getting Started Guide AWS Static Website Hosting Amazon CloudFront Cost Breakdown The total monthly cost is the sum of the data transfer out plus the requests costs for each of the regions. Variable Formula Calculation Data Transfer Out for US Monthly Volume (GB) 30.00 Traffic Distribution (%) 0.50 x Data Out Rate x 0.12 -------------------------- ------ $1.80 Data Transfer Out for EU Monthly Volume (GB) 30.00 Traffic Distribution (%) 0.25 x Data Out Rate x 0.12 -------------------------- ------ $0.90 Data Transfer Out for Monthly Volume (GB) 30.00 HK/Singapore Traffic Distribution (%) 0.10 x Data Out Rate x 0.19 -------------------------- ------ $0.57 23
  • 27. Getting Started Guide AWS Static Website Hosting Summing It All Up Variable Formula Calculation Data Transfer Out for JP Monthly Volume (GB) 30.00 Traffic Distribution (%) 0.15 x Data Out Rate x 0.201 -------------------------- ------- $0.90 Requests for US Request Rate $0.0075 Traffic Distribution (%) 0.50 x (Monthly Volume/Object Size x (30 GB/50 KB/10K) (per 10,000 requests)) -------------------- ---------------------------------------------------- $0.24 Requests for EU Request Rate $0.009 Traffic Distribution (%) 0.25 x (Monthly Volume/Object Size x (30.00 GB/50 KB/10K) (per 10,000 requests)) -------------------- ---------------------------------------------------- $0.15 Requests for HK/Singapore Request Rate $0.0075 Traffic Distribution (%) 0.10 x (Monthly Volume/Object Size x (30.00 GB/50 KB/10K) (per 10,000 requests)) -------------------- ---------------------------------------------------- $0.05 Requests for JP Request Rate $0.0095 Traffic Distribution (%) 0.15 x (Monthly Volume/Object Size x (30.00 GB/50 KB/10K) (per 10,000 requests)) -------------------- ---------------------------------------------------- $0.09 We use the AWS Simple Monthly calculator to estimate this. With the calculator, the total cost for Amazon CloudFront is $4.70. Summing It All Up To calculate the total cost for this scenario, we add the cost for Amazon S3, Amazon CloudFront and the AWS Data Transfer Out, and subtract any discount that falls into the AWS Free Usage Tier. 24
  • 28. Getting Started Guide AWS Static Website Hosting Summing It All Up The total AWS Transfer Out is an aggregate Data Transfer Out usage across Amazon S3 and any other Amazon services you might use. For Amazon S3, we have 0.1 GB per month. Since up to 1 GB per month of data transferred out is free, there is no charge. The following image shows an example of your monthly estimate. The total cost of this static website is estimated at $4.72. 25
  • 29. Getting Started Guide AWS Static Website Hosting Related Resources The following table lists related resources that you'll find useful as you work with AWS services. Resource Description AWS Products and Services A comprehensive list of products and services AWS offers. Documentation Official documentation for each AWS product including service introductions, service features, and API references, and other useful information. AWS Architecture Center Provides the necessary guidance and best practices to build highly scalable and reliable applications in the AWS cloud. These resources help you understand the AWS platform, its services and features. They also provide architectural guidance for design and implementation of systems that run on the AWS infrastructure. AWS Economics Center Provides access to information, tools, and resources to compare the costs of Amazon Web Services with IT infrastructure alternatives. AWS Developer Resource Centers From here, you will find links to developer centers that provide documentation, code samples, release notes, and other information to help you build innovative applications with AWS. AWS Cloud Computing Whitepapers Features a comprehensive list of technical AWS whitepapers covering topics such as architecture, security, and economics. These whitepapers have been authored either by the Amazon team or by AWS customers or solution providers. Videos and Webinars Previously recorded webinars and videos about products, architecture, security, and more. Discussion Forums A community-based forum for developers to discuss technical questions related to Amazon Web Services. AWS Support Center The home page for AWS Technical Support, including access to our Developer Forums, Technical FAQs, Service Status page, and AWS Premium Support. (subscription required). 26
  • 30. Getting Started Guide AWS Static Website Hosting Resource Description AWS Premium Support Information The primary web page for information about AWS Premium Support, a one-on-one, fast-response support channel to help you build and run applications on AWS Infrastructure Services. Form for questions related to your AWS This form is only for account questions. For technical account: Contact Us questions, use the Discussion Forums. Conditions of Use Detailed information about the copyright and trademark usage at Amazon.com and other topics. 27
  • 31. Getting Started Guide AWS Static Website Hosting Document History This document history is associated with the 2011-10-07 release of: Getting Started Guide: AWS Static Website Hosting. This guide was last updated on March 19, 2012. Change Description Release Date New content Created new document. 07 October 2011 28