-
Notifications
You must be signed in to change notification settings - Fork 25
4.1
Paul Duvall edited this page Jan 6, 2020
·
24 revisions
Review and ensure that you have setup your development environment before going through the steps below.

- Go to the ACM Console.
- Click on Get Started.
- Select the Request a public certificate radio button and click the Request a certificate button.
- In the Add domain names section, enter
*followed by the name of the domain you own (for example, I am entering*.encryptaws.com. Yours will be different) in the Domain name field. - Click the Next button.
- On the Select validation method page, choose the DNS validation option and click Review.
- On the Review page, review your settings and click the Confirm and request button.
- On the Validation page, expand the Domain section and click the Create record in Route 53 button. Then click the Create button.
- Once the DNS Record indicates Success, click the Continue button.
- Review your ACM Certificate Configuration on the Certificates page.
- Go to the S3 Console.
- Click the Create bucket button.
- Enter
ceoa-41-ACCOUNTIDin the Bucket name field. ReplaceACCOUNTIDwith the results of the following command:aws sts get-caller-identity --output text --query 'Account'. Click the Create button. - Open the bucket Properties pane and choose Static Website Hosting.
- Click on the Use this bucket to host a website radio button.
- In the Index Document field, type
index.html. - Click the Save button. Write down the Endpoint.
- For the same S3 bucket, go to the Permissions pane and click on Edit.
- Clear the Block all public access checkbox and click on Save and conf your settings.
- From the same to the Permissions pane for the S3 bucket, click on the Bucket Policy tab and paste the following contents in Bucket policy editor:
{
"Version":"2012-10-17",
"Statement":[{
"Sid":"PublicReadForGetBucketObjects",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::ceoa-41-ACCOUNTID/*"
]
}
]
}
- In the policy, replace
ACCOUNTIDwith the name of your AWS account id. - Click Save.
cd ~/environment/ceoa
wget https://docs.aws.amazon.com/codepipeline/latest/userguide/samples/sample-website.zip
unzip sample-website.zip
zip ceoa-41-website.zip *.*
aws s3 sync ~/environment/tls s3://ceoa-41-$(aws sts get-caller-identity --output text --query 'Account')
- Copy the endpoint you had written down and paste it into your web browser.
- An unencrypted website should display.
- Go to the CloudFront Console.
- Click the Create Distribution button.
- Click the Get Started button in the Web section.
- Enter
ceoa-4-ACCOUNTID.s3.amazonaws.comas the Origin Domain Name. - Select
Nofor Restrict Bucket Access. - Select the
Redirect HTTP to HTTPSoption for Viewer Protocol Policy. - Select the
Custom SSL Certificateoption for SSL Certificate and enter the name of the ACM certificate (e.g.*.encryptaws.com (ed651540-1a8b-4450-a150-27cddf5cfdab)) - Select the
TLSv1.1_2016 (recommended)option for Security Policy. - Select the
index.htmloption for Default Root Object. - Go to the CloudFront Console.
- Select the CloudFront Distribution you created and copy the value for the Domain Name and paste it to your web browser.
- It should display the website with a secure certificate.

- Introduction
- Labs
- The Current State of Encryption
- Setup Development Environment
- Lesson 1: Automating AWS Resources
- Lesson 2: Key Management
- Lesson 3: Developing with Encryption
- Lesson 4: Encryption in Transit
- Lesson 5: Encryption at Rest
- Lesson 6: Detecting Encrypted Resources
- Lesson 7: Logging and Searching KMS Keys
- Lesson 8: Continuous Encryption
- Summary