ステージ1:市長


タイド警報システム


クラウドクエストでは、ビジネスの問題を解決するためにあなたの助けを求めている様々な人々があります.
あなたが会う最初の人は市長です.彼は解決すべき問題を抱えています.あなたは、これらの問題を理解し、要件を収集し、クラウドコンピューティングの概念を学び、それらのソリューションを提案します.

挑戦


都市の海岸で予測された波潮汐を掲示するウェブサイトは、オフラインです.低波を望むビーチ・ゲーマーに加えて、高い波を望むサーファーは、いつ浜辺に行くかについて、わかりません.

これはビーチ=低観光収入で低トラフィックにつながる.

解決策


更なる会話を通して、解決はWS 3であなたのウェブサイト内容をアップロードすることによってAWSで静的なウェブサイトを配備することになっています.

AWSで静的ウェブサイトを主催すること


AWS 3



ストレージはAmazonが提供する最初のAWS提供です.したがって、貯蔵はいくつかを含むAWS生態系の重要な場所を保持する
AWSの顧客によるストレージサービスの非常に革新的な使用
年越し
シンプルなストレージサービスは(最もよくS 3として知られている)最も豊かな、最も柔軟な、そして確かに、最も広く使用されているAWSの製品です.S 3を「インターネットのファイリングキャビネット」と呼ぶのは過言ではないそのオブジェクトストレージは、個人や企業などのさまざまなアプリケーションで使用されます.
✓ ドロップボックス
✓ ネットフリックス
✓ メダカ

AWSクラウドフロント



AWS Cloudfrontは、Amazon Web Servicesによって提供されるグローバルに分散されたネットワークで、ソフトウェア、SDK、ビデオなどのコンテンツを確実にクライアントに転送します.

ステップ1 - S 3バケットを作成する


Login into your AWS management console and click on Services on the top navbar.
Select S3 from the Storage section. This should display the S3 dashboard.
From the S3 dashboard, click on Create bucket. Give the bucket a unique name, the name you choose must be globally unique.
Next, choose your preferred AWS Region from the drop-down.
Under Block Public Access settings , uncheck the Block all public access checkbox and accept the acknowledgement and make the bucket accessible to the public because you are going to host a website in it.
Click on disable for Bucket Versioning.
You can also Add tag to the bucket for easy identification.
Under Default encryption section, click on disable for Server-side encryption.
Click on Create bucket.


ステップ2 -アップロードのWebファイルをS 3バケット


バケットを作成した後に、それにウェブサイトのファイルとフォルダをアップロードする必要があります.ファイル(index . html、main . js、style . css、data . csv)は、ゲームのラボセクションで提供されます.

From the S3 dashboard, click on the name of the bucket you just created.
On the Objects tab, you can see that the bucket is currently empty, click on the Upload button.
Click Add files to add the website files.
After the necessary files have been added, scroll down and click on Upload.


セキュリティ


いくつかのポリシーを追加するバケットを確保する.

From the S3 dashboard, click on the name of the bucket, then click on Permissions tab.
Scroll down to the Bucket policy section and click on its Edit button.
To grant public read access for your website, copy the following bucket policy, and paste it in the Bucket policy editor.


{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::Bucket-Name/*"
            ]
        }
    ]
}

Update the Resource to your bucket name. In the preceding example bucket policy, Bucket-Name is a placeholder for the bucket name.
Choose Save changes. A message appears indicating that the bucket policy has been successfully added.


ステップ4 -構成S 3バケット


あなたのウェブサイトのデフォルトのページを指定します.

From the S3 dashboard, click on the name of the bucket, then click on the Properties tab.
Scroll down to the Static website hosting section and click on its Edit button.
Select Enable for Static website hosting. Also, select Host a static website for the Hosting type.
Enter the file for your index.html document.
Scroll down and click on Save Changes.


ステップ5 -クラウドフロントとS 3バケットからコンテンツを提供


ネットワークとコンテンツ配信

Click on CloudFront.
Click on Create Distribution.
On Select a delivery method for your content page,
Click on Get Started under the Web section.
Origin Settings section, click on the Origin Domain Name field and select the S3 bucket you created earlier. In the Origin Path field, enter / to indicate root level.
Restrict Bucket Access, select Yes.
Origin Access Identity, select Create a New Identity.
Grant Read Permissions on Bucket, select Yes
Update Bucket Policy.
Default Cache Behavior Settings section, Viewer Protocol Policy, select Redirect HTTP to HTTPS.
Distribution Settings section, Default Root Object field, enter the filename at the root level, which should be your landing page (index.html).
Leave the rest of the options as default and click on Create Distribution.


CloudFrontディストリビューションが配備された後、ドメイン名の列からURLをコピーし、ブラウザに貼り付けます.
これで、Amazon S 3で静的サイトをホストし、AWS Cloudfrontを使ってコンテンツ配信をスピードアップする方法を知っておくべきです.

エキストラステップ
  • Configuring a custom error document
  • Logging web traffic
  • Configuring a webpage redirect