devops329 / devops

BYU CS 329: QA & DevOps
MIT License
5 stars 18 forks source link

Update awsCloudFront.md Indicate outdated CloudFront instructions #93

Closed frozenfrank closed 3 weeks ago

frozenfrank commented 3 weeks ago

Background

I think you mentioned in class that AWS had already updated the page since you first created the instruction. Even with my squinty-eyed approach, I think I still did something wrong here.

Description

[!IMPORTANT] Update: The troubles actually appear to be related to step number 4 in the instructions. See the "What Did I Do?" section below for a break down of the train of thought and eventual discovery of the problem.

Everything in this file is easy to follow along with, except for this one step (Origin access). I hunted through every sub-menu of the page looking for something else that could represent this, and the best I found were the CloudFront Origin Request Policies.

I never did see the yellow banner telling me to update my bucket permissions. I fear I did something wrong— I have a hard time believing that AWS removed a step and that it will just work without these adjustments.

Screenshot

image

Related Resources

After digging around for awhile, I still haven't found the solution, but I suspect that some of these resources may be helpful:

What Did I Do?

  1. Create the distribution without an OAC
  2. Grabbed a template policy from this support document
  3. Followed these instructions to add the policy to the S3 bucket
    • The Bucket ARN was easily copiable from the edit page
    • I went to the CloudFront distribution page and copied the ARN for my distribution to fill in the parameter.
  4. Continued following the instructions from step 2
  5. Found the Origin Access tab on the CloudFront page.
  6. These instructions lead me right back to the page that didn't work.
  7. I think I finally figured it out. When applying step number 4 from the class instruction, the Origin Access settings are removed. Reverting to the full URL restores the access settings. See this screenshot:
    • Working settings with the full URL
    • image
    • Unavailable settings when a portion of the URL is selected
    • image
frozenfrank commented 3 weeks ago

This does not completely resolve the issue— it only points out some of the core problems I faced while following the instructions. Most of the content is great, but since AWS is changing things quickly, some of the instructions sent me down a long (misdirected) rabbit hole.

I haven't yet gotten this assignment entirely working, and I'll be reaching out to the TAs to see what could be up with the rest of it. I suspect it has something to do with the naming of the CloudFront distribution.

byucs329ta commented 3 weeks ago

Per discussion with James, resolved by commit 6c7cfe88d2d11c955b349c0150bc94f109439cb8

frozenfrank commented 3 weeks ago

Thanks for addressing this @isawamoose!