<?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: Matti Mårds</title>
    <description>The latest articles on DEV Community by Matti Mårds (@mamaar).</description>
    <link>https://dev.to/mamaar</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%2F201847%2Ffb2ca0d2-ec56-42c0-b24e-9123fd4e0f2b.jpeg</url>
      <title>DEV Community: Matti Mårds</title>
      <link>https://dev.to/mamaar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mamaar"/>
    <language>en</language>
    <item>
      <title>AWS CDK and asynchronous requirements</title>
      <dc:creator>Matti Mårds</dc:creator>
      <pubDate>Fri, 26 Jul 2019 13:24:52 +0000</pubDate>
      <link>https://dev.to/mamaar/aws-cdk-4249</link>
      <guid>https://dev.to/mamaar/aws-cdk-4249</guid>
      <description>&lt;p&gt;I have moved my infrastructure definitions to TypeScript and enjoy having the entire stack in the same language.&lt;/p&gt;

&lt;p&gt;For the Lambda functions, I want to compile and bundle the code at deployment. &lt;/p&gt;

&lt;p&gt;I started out defining the stack using inheritance, as the CDK documentation's "Getting Started" page. This quickly showed some difficulties, as Webpack's compiler runs asynchronously, and object constructors do not. &lt;/p&gt;

&lt;p&gt;I changed over to a more functional approach of building the stack. Instead of inheriting from &lt;code&gt;cdk.Stack&lt;/code&gt;, I instantiate it and pass the object to resources as normally.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;I have taken the same approach on a couple of custom CloudFormation resources with success. Now I am looking forward to the future of programming my AWS stack and not statically defining it.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>functional</category>
      <category>typescript</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
