<?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: oedemis</title>
    <description>The latest articles on DEV Community by oedemis (@oedemis).</description>
    <link>https://dev.to/oedemis</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%2F988335%2F5d9f67ea-5b18-41c0-b897-bec0339e3837.jpeg</url>
      <title>DEV Community: oedemis</title>
      <link>https://dev.to/oedemis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/oedemis"/>
    <language>en</language>
    <item>
      <title>Intro to Infrastructure as Code (IaC) in AWS context</title>
      <dc:creator>oedemis</dc:creator>
      <pubDate>Sun, 11 Dec 2022 18:36:39 +0000</pubDate>
      <link>https://dev.to/oedemis/intro-to-infrastructure-as-code-iac-in-aws-context-4gf6</link>
      <guid>https://dev.to/oedemis/intro-to-infrastructure-as-code-iac-in-aws-context-4gf6</guid>
      <description>&lt;p&gt;Hello devs&lt;/p&gt;

&lt;p&gt;This post is about the following AWS picture:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwbtiruav3yn3u3btiuwf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwbtiruav3yn3u3btiuwf.png" alt="iac" width="800" height="831"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ok ... We have here in the cloud parts of the picture the following AWS cloud components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cloudformation&lt;/strong&gt; - Infrastructure as Code service from AWS to deploy aws components&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;S3&lt;/strong&gt; - object storage service, you can deploy here big data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cloudfront&lt;/strong&gt; - CDN service from AWS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lambda&lt;/strong&gt; - Serverless on AWS 🚀&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;....&lt;/p&gt;

&lt;p&gt;The list can be around 200 services 😀&lt;/p&gt;

&lt;p&gt;To deploy these AWS services you have many options. If you quickly test around you can use the AWS console. But if you want more reproducible architecture with CI/CD chain or deployments over stages with many accounts, in Cloud-Native development there are solutions named under the buzzword &lt;strong&gt;IaC (Infrastructure as Code)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;IaC code creates your infrastructure which is composed of cloud services, like S3. The advantage is we can handle your infrastructure like source code 😀&lt;/p&gt;

&lt;h2&gt;
  
  
  Entering Cloudformation
&lt;/h2&gt;

&lt;p&gt;Cloudformation is IaC service from AWS which accepts YML or JSON formatted files and deploys the described infrastructure from these files. Yes, Cloudformation is a setup as YML or JSON file 😀&lt;/p&gt;

&lt;p&gt;For example, the following snippet describes an S3-Bucket (YML-formatted):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MyS3Bucket:
    Type: 'AWS::S3::Bucket'
    Properties:
      BucketName: !Join
        - '-'
        - - !Ref S3BucketName
          - !Ref 'AWS::Region'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The problem with Cloudformation is, these YML or JSON files can be very complex for big cloud architectures. Refactoring can be a disaster, therefore over the years many IaC frameworks are developed, so we enter IaC Frameworks or abstractions over Cloudformation&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.terraform.io/" rel="noopener noreferrer"&gt;Terraform&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.pulumi.com/" rel="noopener noreferrer"&gt;Pulumi&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://aws.amazon.com/de/cdk/" rel="noopener noreferrer"&gt;CDK&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://aws.amazon.com/de/serverless/sam/" rel="noopener noreferrer"&gt;SAM Framework&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.serverless.com/" rel="noopener noreferrer"&gt;Serverless Framework&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://sst.dev/" rel="noopener noreferrer"&gt;SST&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are much more frameworks, every one with its strength and different paradigm.&lt;/p&gt;

&lt;p&gt;All these frameworks produce in AWS as a cloud provider, Cloudformation code (YML-formatted) except Terraform and Pulimi, which creates and deploys your services. Frameworks like CDK, Serverless Framework or SST are only &lt;strong&gt;abstraction&lt;/strong&gt; over Cloudformation, to make it easier to develop your infrastructure.&lt;/p&gt;

&lt;p&gt;For example, the following SST-Snippet creates an S3-Bucket named Uploads.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let bucket = new sst.Bucket(this, "Uploads");

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You see the difference, SST framework in this case uses another abstraction layer over CDK and has a programming paradigm for creating IaC 😀&lt;/p&gt;

&lt;p&gt;Happy Coding 😀&lt;/p&gt;

&lt;p&gt;I write a series of articles also on &lt;a href="https://oedemis.gumroad.com/l/wplrv" rel="noopener noreferrer"&gt;https://oedemis.gumroad.com/l/wplrv&lt;/a&gt;&lt;/p&gt;

</description>
      <category>typescript</category>
    </item>
  </channel>
</rss>
