<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sean Groom</title>
    <description>The latest articles on DEV Community by Sean Groom (@seanbond13).</description>
    <link>https://dev.to/seanbond13</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F761774%2F948a9b52-0333-48a8-a59e-203f7e712eaf.png</url>
      <title>DEV Community: Sean Groom</title>
      <link>https://dev.to/seanbond13</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/seanbond13"/>
    <language>en</language>
    <item>
      <title>You are visitor number...</title>
      <dc:creator>Sean Groom</dc:creator>
      <pubDate>Thu, 13 Jan 2022 18:28:31 +0000</pubDate>
      <link>https://dev.to/seanbond13/you-are-visitor-number-420o</link>
      <guid>https://dev.to/seanbond13/you-are-visitor-number-420o</guid>
      <description>&lt;p&gt;The visitor counter is working! After some time off for the holidays I got back to banging my head against the 403 errors I was getting when my site called the API. The Lambda function worked when I tested it in Lambda and returned the incremented count number. I had the correct CORS headers set up so it wasn't a CORS issue as far as I could tell.&lt;/p&gt;

&lt;p&gt;I followed the &lt;a href="https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-troubleshoot-403-forbidden/"&gt;AWS troubleshooting for 403 errors&lt;/a&gt; and I could curl OPTIONS and get a valid preflight response but not GET or POST.&lt;/p&gt;

&lt;p&gt;To refresh my memory on the whole process I decided to start from the beginning and set up a new Lambda function and API with the intent to figure out what I did wrong with my existing setup.&lt;/p&gt;

&lt;p&gt;The new Lambda function worked just as before since it was the exact same code. My first API was a REST API so for this version I chose an HTTP API. AWS does more of the setup work for you with this version but it eliminates some potential for mistakes on my end.&lt;/p&gt;

&lt;p&gt;The new API created a new IAM role which I had to grant access to Lambda and after that it worked! I could call the invoke URL and get the count instead of an error!&lt;/p&gt;

&lt;p&gt;I updated the URL in my javascript for the resume site and pushed the changes. Loaded up the site again and there it was: "You are visitor 1".&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>aws</category>
      <category>python</category>
    </item>
    <item>
      <title>Tracking Project Status With GitHub Projects</title>
      <dc:creator>Sean Groom</dc:creator>
      <pubDate>Sat, 11 Dec 2021 21:52:42 +0000</pubDate>
      <link>https://dev.to/seanbond13/tracking-project-status-with-github-projects-5fp8</link>
      <guid>https://dev.to/seanbond13/tracking-project-status-with-github-projects-5fp8</guid>
      <description>&lt;p&gt;The Resume Challenge isn't a huge project, but it does involve a fair bit of work in different areas, so to keep track of everything I created a GitHub project for my repo.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OCEbipeD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8klfkzbpz6e6eqvntw6t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OCEbipeD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8klfkzbpz6e6eqvntw6t.png" alt="github project" width="880" height="767"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've used Trello before for organizing projects so I set up my project tracker as a kanban board. The GitHub integration is convenient compared to a standalone kanban and if this was a team project with pull requests and issue tracking it would all tie into the code in the repo. I don't need all that for this simple project but it's nice to know it's there.&lt;/p&gt;

</description>
      <category>github</category>
      <category>kanban</category>
    </item>
    <item>
      <title>CI/CD (Front End)</title>
      <dc:creator>Sean Groom</dc:creator>
      <pubDate>Sat, 11 Dec 2021 06:48:21 +0000</pubDate>
      <link>https://dev.to/seanbond13/cicd-front-end-3p3b</link>
      <guid>https://dev.to/seanbond13/cicd-front-end-3p3b</guid>
      <description>&lt;p&gt;With steps 2-6 complete, I decided to go out of order and complete step 15 now rather than later. Step 15 is creating a GitHub action to automatically push code changes in the repo to the S3 bucket, thus creating a CI/CD process to automate updating the front end.&lt;/p&gt;

&lt;p&gt;I decided to set this up now because I hate manual processes that can (should) be automated. My next task is adding the Javascript counter and DynamoDB table. That could involve a lot of changes and testing with the HTML in the S3 bucket and I'd rather not copy the files to S3 manually after every change.&lt;/p&gt;

&lt;p&gt;The setup for this automation wasn't too hard:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an IAM policy to allow updating the files in the S3 bucket:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "SyncToS3",
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:ListBucket",
                "s3:DeleteObject",
                "s3:GetBucketLocation"
            ],
            "Resource": [
                "arn:aws:s3:::BUCKET-NAME",
                "arn:aws:s3:::BUCKET-NAME/*"
            ]
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Create an IAM user with only programmatic access and assign the policy.&lt;/li&gt;
&lt;li&gt;Add the IAM user's access key and secret access key to the GitHub repo's secrets.&lt;/li&gt;
&lt;li&gt;Create the GitHub Action:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;name: Upload to S3

on:
  push:
    branches:
    - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v1

    - name: Configure AWS Credentials
      uses: aws-actions/configure-aws-credentials@v1
      with:
        aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
        aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        aws-region: us-west-1

    - name: Deploy static site to S3 bucket
      run: aws s3 sync FOLDER-NAME s3://BUCKET-NAME --delete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now when a change is pushed to the GitHub repo the file is automatically uploaded to the S3 bucket.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;br&gt;
To have the action only run when files are changed in a certain folder, use the &lt;code&gt;paths&lt;/code&gt; option. This enables different actions to be run for things like syncing the front_end folder to S3 and the back_end folder to API Gateway.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;on:
  push:
    branches:
    - master
    paths:
    - 'FOLDER-NAME/**'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>aws</category>
      <category>github</category>
      <category>devops</category>
      <category>automation</category>
    </item>
    <item>
      <title>First Hurdle</title>
      <dc:creator>Sean Groom</dc:creator>
      <pubDate>Fri, 10 Dec 2021 22:15:33 +0000</pubDate>
      <link>https://dev.to/seanbond13/first-hurdle-ofd</link>
      <guid>https://dev.to/seanbond13/first-hurdle-ofd</guid>
      <description>&lt;p&gt;I'm off to a good start so far:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I typed up my resume in HTML and used a free template for the layout and CSS. The challenge says keep it simple since it's not a web development challenge.&lt;/li&gt;
&lt;li&gt;I created an S3 bucket to host the files&lt;/li&gt;
&lt;li&gt;CloudFront distribution for HTTPS access with an ACM cert&lt;/li&gt;
&lt;li&gt;Added a CNAME in my &lt;a href="http://www.seangroom.com"&gt;personal domain&lt;/a&gt; pointing to CloudFront so it can be accessed with &lt;a href="https://resume.seangroom.com"&gt;resume.seangroom.com&lt;/a&gt; instead of &lt;a href="https://d16vv58p9r6mg6.cloudfront.net"&gt;https://d16vv58p9r6mg6.cloudfront.net/&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All the pieces are there for the basic setup so why am I getting a 403 error?&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--10ydIusI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ujjocueqfulp6h9h78we.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--10ydIusI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ujjocueqfulp6h9h78we.png" alt="mixed_content_error" width="880" height="116"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Chrome DevTools are your friend!
&lt;/h6&gt;

&lt;p&gt;Mixed content! I didn't catch that the free template I used had a linked to a CSS file hosted by Yahoo over http. The template is from a simpler time (2009) when the web wasn't as secure, and if I wasn't using CloudFront for HTTPS it wouldn't even be an issue.&lt;/p&gt;

&lt;p&gt;I uploaded the CSS file to the S3 bucket and changed the path in the HTML and then it was all green lights. That's steps 2-6 completed. Now to tackle the Javascript counter.&lt;/p&gt;

</description>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Challenge Accepted</title>
      <dc:creator>Sean Groom</dc:creator>
      <pubDate>Fri, 10 Dec 2021 21:50:49 +0000</pubDate>
      <link>https://dev.to/seanbond13/challenge-accepted-2b6n</link>
      <guid>https://dev.to/seanbond13/challenge-accepted-2b6n</guid>
      <description>&lt;p&gt;Have you heard of the &lt;a href="https://cloudresumechallenge.dev/instructions/"&gt;Cloud Resume Challenge&lt;/a&gt;? It's a cloud project spec created by &lt;a href="https://twitter.com/forrestbrazeal"&gt;Forrest Brazeal&lt;/a&gt; as a way to demonstrate your skills and get a job in cloud computing.&lt;/p&gt;

&lt;p&gt;I have over a decade of experience as a System Administrator but I'm ready to transition into more of a cloud native engineering role. My favorite part of working in IT is learning about and building new things. I've learned a lot about things like AWS, CI/CD, IaC, containers, etc and it's time to put it all together by building something that demonstrates my skills and helps me get a job using them. &lt;strong&gt;Cloud Resume Challenge accepted!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The tl;dr of the challenge is to create your resume in html and host it on one of the major cloud platforms (AWS, GCP, Azure). Sounds easy right? Yes and no. Here are the 16 steps in the challenge (AWS version):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pass at least the Amazon Cloud Practitioner exam.&lt;/li&gt;
&lt;li&gt;Write your resume in HTML.&lt;/li&gt;
&lt;li&gt;Style your resume with CSS.&lt;/li&gt;
&lt;li&gt;Host the HTML and CSS with an S3 bucket.&lt;/li&gt;
&lt;li&gt;Use HTTPS to server the site with CloudFront.&lt;/li&gt;
&lt;li&gt;Point a custom DNS domain at the CloudFront distribution.&lt;/li&gt;
&lt;li&gt;Create a page visitor counter using Javascript.&lt;/li&gt;
&lt;li&gt;Store the visitor counter data in DynamoDB.&lt;/li&gt;
&lt;li&gt;Create an API for the Javascript to talk to DynamoDB.&lt;/li&gt;
&lt;li&gt;Use Python for the Lambda function in your API.&lt;/li&gt;
&lt;li&gt;Write tests for the Python code.&lt;/li&gt;
&lt;li&gt;Define the API, DynamoDB table, API Gateway and Lambda function in the AWS Serverless Application Model.&lt;/li&gt;
&lt;li&gt;Create a GitHub repo for the backend API code.&lt;/li&gt;
&lt;li&gt;Use GitHub Actions to test your API code and push to AWS.&lt;/li&gt;
&lt;li&gt;Create another GitHub repo for the frontend HTML and CSS code and use GitHub Actions to push changes to the S3 bucket.&lt;/li&gt;
&lt;li&gt;Create a blog post about your project and what you've learned.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Time to get building!&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>cloudskills</category>
      <category>aws</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
