Awsgsg swh

430 views

Published on

Published in: Technology, Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
430
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Awsgsg swh

  1. 1. Getting Started GuideAWS Static Website Hosting
  2. 2. Getting Started Guide AWS Static Website HostingGetting Started Guide: AWS Static Website HostingCopyright © 2011 Amazon Web Services LLC or its affiliates. All rights reserved.
  3. 3. Getting Started Guide AWS Static Website HostingOverview ................................................................................................................................................ 1Getting Started ...................................................................................................................................... 4Step 1: Sign Up for the Service .............................................................................................................. 4Step 2: Create an Amazon S3 Bucket .................................................................................................... 5Step 3: Create an Amazon CloudFront Distribution ............................................................................... 8Step 4: Hosting Your Website ............................................................................................................... 13Step 5: Clean Up .................................................................................................................................. 17 Disable and Delete an Amazon CloudFront Distribution ............................................................ 17 Delete Objects and an Amazon S3 Bucket ................................................................................. 18Amazon Route 53 ................................................................................................................................ 19Pricing .................................................................................................................................................. 20Amazon S3 Cost Breakdown ............................................................................................................... 20Amazon CloudFront Cost Breakdown ................................................................................................... 22Summing It All Up ................................................................................................................................ 24Related Resources ............................................................................................................................... 26Document History ................................................................................................................................. 28 3
  4. 4. Getting Started Guide AWS Static Website HostingOverview 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. Its 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. 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, youll 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 websites 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 dont 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. 6. Getting Started Guide AWS Static Website Hosting Static Website Hosting ArchitectureStatic 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. 7. Getting Started Guide AWS Static Website Hosting Step 1: Sign Up for the ServiceGetting 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 dont 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. 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 companys name. For this example, well 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. 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, lets configure the bucket to be a website.To configure your Amazon S3 bucket as a website1. 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. 10. Getting Started Guide AWS Static Website Hosting Step 2: Create an Amazon S3 Bucket4. 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 onAmazon S3.Now that youve set up your bucket as a website, lets enable logging for your bucket.You might want to see the activity your Amazon S3 bucket is getting. Amazon S3 provides a way to enablelogging on your buckets. With logging enabled, you can track information such as data in and out of yourbucket and the IP addresses of who is accessing your bucket.To enable logging for your bucket1. 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. 11. Getting Started Guide AWS Static Website Hosting Where Youre 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 Youre At Heres 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 youll create an Amazon CloudFront distribution.Step 3: Create an Amazon CloudFrontDistribution 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. Lets 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, youll need to locate and copy down the endpoint for your Amazon S3 website. 8
  12. 12. Getting Started Guide AWS Static Website Hosting Step 3: Create an Amazon CloudFront DistributionTo locate the endpoint for your Amazon S3 website1. 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 websites endpoint.To create a distribution with an Amazon S3 origin, we will use the AWS Management Console.To create an Amazon CloudFront distribution1. 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 websites 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. 13. Getting Started Guide AWS Static Website Hosting Step 3: Create an Amazon CloudFront Distribution4. Click Continue. For the purpose of this walkthrough, youll 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. 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 distributions 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. 15. Getting Started Guide AWS Static Website Hosting Where Youre AtAfter creating the distribution, it might take a few minutes for the distribution to deploy. The distributionscurrent status is displayed in the console under Status. A status of InProgress indicates that the distributionis not yet fully deployed.When your distribution is deployed, you are ready to reference your content with your new AmazonCloudFront domain name or CNAME.Where Youre AtHeres where you are at in building out your architecture.Your Amazon CloudFront distribution takes a few minutes to deploy. While you are waiting for thedistribution to be deployed, lets move on to the next topic where you will host your website files. 12
  16. 16. Getting Started Guide AWS Static Website Hosting Step 4: Hosting Your WebsiteStep 4: Hosting Your Website Now that youve created an Amazon S3 bucket and created a Amazon CloudFront distribution, you are ready to upload your website files. Before uploading any files, youll 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. 17. Getting Started Guide AWS Static Website Hosting Step 4: Hosting Your Website4. 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 yourbucket. 14
  18. 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 wantto use for your website. None of these files are publicly viewable until you set public permissions in theAWS Management Console.You can set the public permissions for the files all at once, or set public permissions per file. Whendeploying your static website, you might want to test each file to ensure that it works before making thempublic.To set public permissions1. 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 itsAmazon S3 address or through your Amazon CloudFront distribution URL.To locate the address of your Amazon S3 website1. In the Amazon S3 console, right-click your bucket and select Properties. The Properties pane appears. 15
  19. 19. Getting Started Guide AWS Static Website Hosting Step 4: Hosting Your Website2. 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. 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, youll 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 youve learned how to deploy a static website, its 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. 21. Getting Started Guide AWS Static Website Hosting Delete Objects and an Amazon S3 BucketDelete Objects and an Amazon S3 BucketBuckets with objects in them cannot be deleted. Before deleting a bucket, all objects within the bucketmust be deleted.You should also ensure that logging for your Amazon S3 bucket is disabled. Otherwise, logs might beimmediately written to your bucket after you delete your buckets objects.To disable logging1. 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 object1. 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 bucket1. 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. 22. Getting Started Guide AWS Static Website HostingAmazon Route 53 AWS provides flexible services, and there are many variations you can use to host your static website. In this section, well 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 registrars name server records. Note Make sure you update the CNAME for the Amazon CloudFront distribution if you haven’t already set it. 19
  23. 23. Getting Started Guide AWS Static Website Hosting Amazon S3 Cost BreakdownPricing 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. 24. Getting Started Guide AWS Static Website Hosting Amazon S3 Cost BreakdownCharacteristic Metric DescriptionRequests 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 CalculationProvisioned Storage Storage rate $0.125 x Storage Amount (GB) x 0.001 ---------------------- ------- $0.00 21
  25. 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. 26. Getting Started Guide AWS Static Website Hosting Amazon CloudFront Cost BreakdownThe 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. 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. 28. Getting Started Guide AWS Static Website Hosting Summing It All UpThe total AWS Transfer Out is an aggregate Data Transfer Out usage across Amazon S3 and any otherAmazon services you might use. For Amazon S3, we have 0.1 GB per month. Since up to 1 GB per monthof 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. 29. Getting Started Guide AWS Static Website HostingRelated Resources The following table lists related resources that youll 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. 30. Getting Started Guide AWS Static Website HostingResource DescriptionAWS 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 technicalaccount: 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. 31. Getting Started Guide AWS Static Website HostingDocument 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

×