AWS CloudFormation:

A stack in the sky

โ›…

โ˜๏ธ

๐ŸŒง๏ธ

๐ŸŒฌ๏ธ

๐Ÿ›ฉ๏ธ

๐Ÿฅž

Follow along

Who this?

My name is not as complicated as you think ๐Ÿค“

Not a pickle ย ๐Ÿฅ’

Senior software engineer ๐Ÿ‘ด๐Ÿป

French ๐Ÿ‡ซ๐Ÿ‡ท

JavaScript All The Things! โšก

AWS Cloud Practitioner ๐Ÿ“œย 

โœ‹โœ‹โœ‹โœ‹โœ‹
On a scale from ๐ŸŒˆ to ๐Ÿ’ฉ
how do you feel about CloudFormation?

third option: โ›๏ธ

CloudFormation

Infrastructure as Code (template) ๐Ÿ›ฃ๏ธ

YAML / JSON โœ๏ธ

Deploy and connect resources ๐Ÿ—๏ธ

Organized as stacks ๐Ÿ“š

Continuous integration/development โ™ป๏ธ

IAM roles & policies ๐Ÿ‘ฎโ€โ™€๏ธ

Check errors / Automatic rollback ๐Ÿ’ฅ

No additional costย  ๐Ÿ‘

What CF does not do

Coffee โ˜•

Access your machine locally (SAM) ๐Ÿ–ฅ๏ธ

Check that your stack works the way you expect it to work (tests) ๐Ÿ”ง

Monitor cost of deployed resources ๐Ÿ’ฐ

CloudFormation is not a super admin ๐Ÿ—ฟ

ย 

Anatomy of a template

AWSTemplateFormatVersion: "2010-09-09"
Description: Static website using S3

Resources:
  S3Bucket:
    Type: AWS::S3::Bucket
    Properties:
      AccessControl: PublicRead
      BucketName: amazing-website-about-gherkins
      WebsiteConfiguration:
        IndexDocument: index.html
        ErrorDocument: error.html
    DeletionPolicy: Delete

Outputs:
  WebsiteURL:
    Value: !GetAtt [S3Bucket, WebsiteURL]
    Description: URL for website hosted on S3
  S3BucketSecureURL:
    Value: !Join ["", ["https://", !GetAtt [S3Bucket, DomainName]]]
    Description: Name of S3 bucket to hold website content

๐ŸŽฎ

Let's check out

the console

Common resource types

Something more involved

Lambda function and DynamoDB table.

Parameters (environment variables).

Create roles programmatically.

Stackery to the rescue!

Visualization of your templates ๐Ÿ‘€

Improvement compared to CF Designer ๐Ÿ“Š

Handle 20 common resources ๐Ÿคน

CLI, GUI, VSC plugin ๐Ÿ‘ฉโ€๐Ÿ’ป

Great documentation ๐Ÿ“–

Linked to your GitHub repositories (PRO) ๐Ÿ”—

Developer plan is free ๐Ÿ‘Œ

Use CodeBuild under the hood ๐ŸŽ๏ธ

๐Ÿ’ฌ
Let's connect the dots

Links

Questions?

๐Ÿ™‹โ€โ™€๏ธ๐Ÿ™‹โ€โ™‚๏ธ

AWS CloudFormation: A stack in the sky

By Yves Gurcan

AWS CloudFormation: A stack in the sky

Link to the talk event on Meetup: https://www.meetup.com/Portland-Serverless-Architecture-Meetup/events/268360327/. Tired of zipping your Lambdas by hand every time you want to deploy to production? What if I told you that there is a solution that lets you deploy your entire application to AWS from your local machine? What, you don't believe me? But this tool even has a cool aerial name that's like super on point because it's about cloud computing. Too good to be true? Great news! It's called CloudFormation.

  • 1,486