<?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: Forrest Brazeal</title>
    <description>The latest articles on DEV Community by Forrest Brazeal (@forrestbrazeal).</description>
    <link>https://dev.to/forrestbrazeal</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%2F173176%2F7dffd743-dc40-463a-b71c-564188f2152e.jpg</url>
      <title>DEV Community: Forrest Brazeal</title>
      <link>https://dev.to/forrestbrazeal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/forrestbrazeal"/>
    <language>en</language>
    <item>
      <title>The cloud resume challenge</title>
      <dc:creator>Forrest Brazeal</dc:creator>
      <pubDate>Mon, 27 Apr 2020 16:45:25 +0000</pubDate>
      <link>https://dev.to/forrestbrazeal/the-cloud-resume-challenge-503g</link>
      <guid>https://dev.to/forrestbrazeal/the-cloud-resume-challenge-503g</guid>
      <description>&lt;p&gt;We're now at that point in quarantine where even &lt;a href="https://www.usatoday.com/story/money/2020/04/23/coronavirus-could-cost-state-government-worker-their-jobs/2998645001/"&gt;the jobs people thought were safe&lt;/a&gt; are starting to dry up. Friends and family are telling me: "I've been thinking about changing careers and going into IT. Maybe doing something in the cloud, like you. Where should I start?"&lt;/p&gt;

&lt;p&gt;So I'm making an offer right now, before God and the internet and everybody: send me your resume, and I will do my best to help you get a job in the cloud.&lt;/p&gt;

&lt;p&gt;Yes, there are some conditions. The first two are easy.&lt;/p&gt;

&lt;p&gt;The first condition is that I am not personally hiring anybody at the moment, and cannot force anyone else to hire you. But I have a relatively large network of connections, at least forty percent of whom seem to be tech recruiters, and I will make as much noise as possible to get their attention on you and your resume.&lt;/p&gt;

&lt;p&gt;Second condition: you must not have prior professional IT experience on your resume (except maybe something super entry-level like helpdesk), and you can't have a college degree in a tech-related major. I want to focus on helping new people break into the industry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you are fortunate enough to have a job in the cloud already, please share this post with #CloudResumeChallenge -- let's get it in the hands of the people who need it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;OK, now the important conditions.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Your resume needs to have the &lt;a href="https://aws.amazon.com/certification/certified-cloud-practitioner/"&gt;AWS Cloud Practitioner certification&lt;/a&gt; on it. This is an introductory certification that orients you on the industry-leading AWS cloud -- if you have a more advanced AWS cert, that's fine but not expected. No cheating: include the validation code on the resume. You can sit this exam online for $100 USD. If that cost is a dealbreaker for you, let me know and I'll see if I can help. &lt;a href="https://www.selikoff.net/2019/01/20/how-i-recommend-studying-for-the-aws-certified-cloud-practitioner-exam/"&gt;Here are some exam prep resources&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;Your resume needs to be written in &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML"&gt;HTML&lt;/a&gt;. Not a Word doc, not a PDF. &lt;a href="https://codepen.io/emzarts/pen/OXzmym"&gt;Here is an example of what I mean&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Your resume needs to be styled with &lt;a href="https://www.w3schools.com/css/"&gt;CSS&lt;/a&gt;. No worries if you're not a designer -- neither am I. It doesn't have to be fancy. But we need to see something other than raw HTML when we open the webpage.&lt;/li&gt;
&lt;li&gt;Your HTML resume should be deployed online as an &lt;a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html"&gt;Amazon S3 static website&lt;/a&gt;. Services like Netlify and GitHub Pages are great and I would normally recommend them for personal static site deployments, but they make things a little too abstract for our purposes here. Use S3. &lt;/li&gt;
&lt;li&gt;The S3 website URL should use &lt;a href="https://www.cloudflare.com/learning/ssl/what-is-https/"&gt;HTTPS&lt;/a&gt; for security. You will need to use &lt;a href="https://aws.amazon.com/blogs/networking-and-content-delivery/amazon-s3-amazon-cloudfront-a-match-made-in-the-cloud/"&gt;Amazon CloudFront&lt;/a&gt; to help with this.&lt;/li&gt;
&lt;li&gt;Point a custom DNS domain name to the CloudFront distribution, so your resume can be accessed at something like &lt;code&gt;my-c00l-resume-website.com&lt;/code&gt;. You can use &lt;a href="https://aws.amazon.com/route53/"&gt;Amazon Route 53&lt;/a&gt; or any other DNS provider for this. A domain name usually costs about ten bucks to register.&lt;/li&gt;
&lt;li&gt;Your resume webpage should include a visitor counter that displays how many people have accessed the site. You will need to write a bit of &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript"&gt;Javascript&lt;/a&gt; to make this happen. Here is a &lt;a href="https://www.codecademy.com/learn/introduction-to-javascript"&gt;helpful tutorial&lt;/a&gt; to get you started in the right direction.&lt;/li&gt;
&lt;li&gt;The visitor counter will need to retrieve and update its count in a database somewhere. I suggest you use Amazon's &lt;a href="https://aws.amazon.com/dynamodb/"&gt;DynamoDB&lt;/a&gt; for this. (Use on-demand pricing for the database and you'll pay essentially nothing, unless you store or retrieve much more data than this project requires.) Here is a &lt;a href="https://linuxacademy.com/course/dynamo-db-deep-dive/"&gt;great free course&lt;/a&gt; on DynamoDB.&lt;/li&gt;
&lt;li&gt;Do not communicate directly with DynamoDB from your Javascript code. Instead, you will need to create an &lt;a href="https://medium.com/@perrysetgo/what-exactly-is-an-api-69f36968a41f"&gt;API&lt;/a&gt; that accepts requests from your web app and communicates with the database. I suggest using AWS's API Gateway and Lambda services for this. They will be free or close to free for what we are doing. You will need to write a bit of code in the Lambda function; you could use more Javascript, but it would be better for our purposes to explore Python -- a common language used in back-end programs and scripts -- and its &lt;a href="https://boto3.amazonaws.com/v1/documentation/api/latest/index.html"&gt;boto3 library for AWS&lt;/a&gt;. Here is a good, free &lt;a href="https://www.learnpython.org/"&gt;Python tutorial&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;You should also include some tests for your Python code. &lt;a href="https://realpython.com/python-testing/"&gt;Here are some resources&lt;/a&gt; on writing good Python tests.&lt;/li&gt;
&lt;li&gt;You should not be configuring your API resources -- the DynamoDB table, the API Gateway, the Lambda function -- manually, by clicking around in the AWS console. Instead, define them in an &lt;a href="https://aws.amazon.com/serverless/sam/"&gt;AWS Serverless Application Model (SAM) template&lt;/a&gt; and deploy them using the AWS SAM CLI. This is called "&lt;a href="https://www.hashicorp.com/resources/what-is-infrastructure-as-code/"&gt;infrastructure as code&lt;/a&gt;" or IaC. It saves you time in the long run.&lt;/li&gt;
&lt;li&gt;You do not want to be updating either your back-end API or your front-end website by making calls from your laptop, though. You want them to update automatically whenever you make a change to the code. (This is called &lt;a href="https://help.github.com/en/actions/building-and-testing-code-with-continuous-integration/about-continuous-integration"&gt;continuous integration and deployment, or CI/CD&lt;/a&gt;.) Create a private &lt;a href="https://help.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-new-repository"&gt;GitHub repository&lt;/a&gt; for your backend code. Set up &lt;a href="https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions"&gt;GitHub Actions&lt;/a&gt; such that when you push an update to your Serverless Application Model template or Python code, your Python tests get run. If the tests pass, the SAM application should get packaged and deployed to AWS.&lt;/li&gt;
&lt;li&gt;Create a second private GitHub repository for your website code. Create GitHub Actions such that when you push new website code, the S3 bucket automatically gets updated. (You may need to &lt;a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html"&gt;invalidate your CloudFront cache&lt;/a&gt; in the code as well.) &lt;em&gt;Important note: DO NOT commit AWS credentials to source control! Bad hats will find them and use them against you!&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Finally, in the text of your resume, you should link a short blog post describing some things you learned while working on this project. &lt;a href="https://dev.to"&gt;Dev.to&lt;/a&gt; is a great place to publish if you don't have your own blog.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And that's it. When you have done all this, add my GitHub username (&lt;code&gt;@forrestbrazeal&lt;/code&gt;) as a collaborator on your repositories. If you have indeed met the conditions listed above, I will give you a personalized code review, then make as much noise about you as I can to anybody who will listen (including sharing your awesome blog post!).&lt;/p&gt;

&lt;p&gt;Now, before you say it ... obviously, I have no right to tell you to do any of this stuff. You will have to open a large number of browser tabs to figure out the steps. It will take you quite a few long evenings at the kitchen table. You might reasonably conclude that none of what I just suggested is worth the dubious reward of having a random industry professional share your resume with a few thousand people.&lt;/p&gt;

&lt;p&gt;But if you give this project a try and realize that you hate it, or you're just not interested, you'll have learned a valuable lesson about whether or not you really want a career in the cloud -- because these are the types of problems that real cloud engineers and developers really work on.&lt;/p&gt;

&lt;p&gt;And I believe that if you can, in good faith, complete the Cloud Resume Challenge, you will already have more useful skills than a lot of people who graduate from university computer science programs. Specifically: you will understand something about full-stack software development, version control, infrastructure as code, automation, continuous integration and delivery, cloud services and "serverless", application security, and networking. And you'll have learned by doing, because I didn't give you enough instructions to figure any of this out without going down some late-night rabbit holes. Most importantly, you will have demonstrated the number-one skill in a cloud engineer's toolbox: the ability to learn fast and google well.&lt;/p&gt;

&lt;p&gt;Those are skills you can take to a job interview. And I'll do my best to help you get one.&lt;/p&gt;

&lt;p&gt;Good luck!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>beginners</category>
      <category>career</category>
    </item>
    <item>
      <title>CI/CD, AWS, and Serverless: 5 tips I learned the hard way</title>
      <dc:creator>Forrest Brazeal</dc:creator>
      <pubDate>Wed, 29 May 2019 18:42:16 +0000</pubDate>
      <link>https://dev.to/trek10inc/ci-cd-aws-and-serverless-5-tips-i-learned-the-hard-way-223p</link>
      <guid>https://dev.to/trek10inc/ci-cd-aws-and-serverless-5-tips-i-learned-the-hard-way-223p</guid>
      <description>&lt;p&gt;So you want to build a &lt;a href="https://aws.amazon.com/serverless/" rel="noopener noreferrer"&gt;serverless app on AWS&lt;/a&gt;?&lt;/p&gt;

&lt;p&gt;Great! There are lots of cool posts that show you how to get started.&lt;/p&gt;


&lt;div class="ltag__link"&gt;
  &lt;a href="/trek10inc" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__org__pic"&gt;
      &lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F780%2F88cc648e-b667-46ed-b34d-eccf83190dc1.png" alt="Trek10" width="400" height="400"&gt;
      &lt;div class="ltag__link__user__pic"&gt;
        &lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F171486%2F36cde198-caaf-4fe4-8b99-d5bb178eb2d9.jpg" alt="" width="800" height="800"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/trek10inc/build-a-real-time-serverless-visitor-counter-with-aws-amplify-1c0l" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;An Intro to the Power of Serverless with AWS Amplify&lt;/h2&gt;
      &lt;h3&gt;Jared Short for Trek10 ・ May 29 '19&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#aws&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#graphql&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#tutorial&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;But how do you get that app off your laptop and into the cloud? You could zip your code and upload it manually into the AWS console every time you change something, but that would get old pretty fast. &lt;/p&gt;

&lt;p&gt;What you probably want is some kind of CI/CD (continuous integration / continuous delivery) system, where code is automatically tested and released to your environment when you push changes to a source control repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63q6y7doxd1tpt5ri3my.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63q6y7doxd1tpt5ri3my.png" alt="An example CI/CD pipeline" width="800" height="311"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;An example CI/CD pipeline&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I've been building CI/CD pipelines for serverless on AWS for years, and I've picked up a few tricks along the way. Here are five tips I wish somebody had told me when I first got started.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test code locally and services in the cloud
&lt;/h2&gt;

&lt;p&gt;There are several ways to run a Lambda function on your local developer machine -- for example, the Serverless Framework's &lt;a href="https://github.com/dherault/serverless-offline" rel="noopener noreferrer"&gt;serverless-offline&lt;/a&gt; plugin or the &lt;a href="https://github.com/awslabs/aws-sam-cli" rel="noopener noreferrer"&gt;AWS SAM CLI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This works great for quickly testing changes to your code. But a serverless app is a lot more than just code: permissions, service configurations, and other things can go wrong as you glue services together to build a truly cloud-native application. &lt;/p&gt;

&lt;p&gt;So local testing is not enough. The more external services you integrate with, the more you'll have to mock, and the more your tests will take on a tinge of unreality. You'll be testing a system that doesn't exist.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc6mjbrfvwy7xh98t96bv.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc6mjbrfvwy7xh98t96bv.gif" alt="Hopes and dreams" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instead, my rule of thumb is to test code locally and services in the cloud. This might involve the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make an initial deployment in AWS that contains the definitions for services your code depends on (for example, deploying an underlying IAM role or a DynamoDB table). &lt;/li&gt;
&lt;li&gt;Run your Lambda function locally as you develop and test the code, reaching out to cloud services for your dependencies.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This way, you can quickly iterate on code, but if something breaks on the cloud side, you'll know! When your Lambda function works locally as expected, you can push it to the cloud as well, where you should...&lt;/p&gt;

&lt;h2&gt;
  
  
  Prioritize end-to-end functionality tests over unit tests
&lt;/h2&gt;

&lt;p&gt;As a general rule, we want to be writing &lt;em&gt;less&lt;/em&gt; code in the serverless world. It's quite possible to write a useful service in AWS using mostly configuration. For example, you can build a CRUD API using &lt;a href="https://aws.amazon.com/blogs/compute/using-amazon-api-gateway-as-a-proxy-for-dynamodb/" rel="noopener noreferrer"&gt;API Gateway and DynamoDB alone&lt;/a&gt; - no Lambda functions in the middle required.&lt;/p&gt;

&lt;p&gt;The more "serverless" you get, the less code you can usefully unit test, and the more you have to rely on tests of your &lt;em&gt;deployed infrastructure&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Lately I've been using &lt;a href="https://www.cypress.io/" rel="noopener noreferrer"&gt;Cypress&lt;/a&gt; for end-to-end tests of serverless APIs. It's a Javascript test framework that works with assertion libraries like Jest and Chai. You can query your API directly, no inside knowledge of the code required. This is testing your service the way your users will experience it, so you can be sure your expectations match reality.&lt;/p&gt;

&lt;p&gt;If you want to test AWS resources directly, a cool project to check out is Erez Rokah's &lt;a href="https://github.com/erezrokah/aws-testing-library" rel="noopener noreferrer"&gt;AWS Testing Library&lt;/a&gt;, which lets you write tests directly against deployed resources like DynamoDB tables or SQS queues.&lt;/p&gt;

&lt;p&gt;If you're writing tests, of course, you'll need some place to run them. AWS provides a managed build service called CodeBuild that you should be paying attention to, because...&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS CodeBuild is hugely underrated
&lt;/h2&gt;

&lt;p&gt;Ever had to babysit a build server that was constantly crashing because one rogue job ate all the disk space? That's not a very "serverless" thing to do.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yg1ah20ckzv0iblkewq.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yg1ah20ckzv0iblkewq.gif" alt="Oops!" width="500" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Fortunately, AWS CodeBuild spins up a completely separate Docker-based build environment for every invocation of a build job. It's truly ephemeral compute, pay only for what you use, and it's pretty cheap -- 500 build minutes a month &lt;a href="https://aws.amazon.com/codebuild/pricing/" rel="noopener noreferrer"&gt;will run you a cool $2.00&lt;/a&gt;. The containers can take a few seconds to initialize, but that's way better than managing a pool of build runners that may flake out on you at any time.&lt;/p&gt;

&lt;p&gt;Once you've got CodeBuild in your corner, you should take a look at another AWS tool for developers, because ...&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS CodePipeline is the single best way to manage CloudFormation releases
&lt;/h2&gt;

&lt;p&gt;CloudFormation is AWS's infrastructure-as-config service: you create a template that defines your Lambda functions, IAM roles, etc. (The &lt;a href="https://aws.amazon.com/serverless/sam/" rel="noopener noreferrer"&gt;Serverless Application Model, or SAM&lt;/a&gt;, which makes it easier to define serverless apps on AWS, is just CloudFormation with a little special sauce.)&lt;/p&gt;

&lt;p&gt;Another annoying CI/CD thing I've had to do a lot is write scripts that poll AWS CloudFormation for updates. CodePipeline is really good at doing that for me. So I can trust it to manage my serverless infrastructure deployments as they roll from development, to staging, to production environments.&lt;/p&gt;

&lt;p&gt;None of these services come without gotchas, of course. The most important one I can warn you about right now is this:&lt;/p&gt;

&lt;h2&gt;
  
  
  CodePipeline only supports one branch per pipeline (at least for now)
&lt;/h2&gt;

&lt;p&gt;No doubt this will change someday, but at present you can trigger a CodePipeline from only one source, such as a repository branch. If you have branch-based workflows, this gets frustrating quickly. &lt;/p&gt;

&lt;p&gt;One workaround is to dynamically create a new CodePipeline per branch using a Lambda function, which has worked pretty well for us at Trek10 -- well enough that we recently &lt;a href="https://github.com/aws-quickstart/quickstart-trek10-serverless-enterprise-cicd" rel="noopener noreferrer"&gt;open-sourced the idea as an AWS Quickstart&lt;/a&gt;. That Quickstart contains the CloudFormation templates needed to spin up dynamic CodePipelines that include CodeBuild jobs, Lambda tests, and lots more -- so what are you waiting for? Give it a try, and hit me up in the comments if you have other questions.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cicd</category>
      <category>serverless</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
