<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jakub Woźniak on Medium]]></title>
        <description><![CDATA[Stories by Jakub Woźniak on Medium]]></description>
        <link>https://medium.com/@jakubwozniak?source=rss-82fc5d18e6c2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HV-TQvlphagcllJ7SsQscA.png</url>
            <title>Stories by Jakub Woźniak on Medium</title>
            <link>https://medium.com/@jakubwozniak?source=rss-82fc5d18e6c2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 00:41:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jakubwozniak/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Our way to Cloud Development Kit in production]]></title>
            <link>https://medium.com/nordcloud-engineering/our-way-to-cloud-development-kit-in-production-72fc082ab930?source=rss-82fc5d18e6c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/72fc082ab930</guid>
            <category><![CDATA[cloud-development-kit]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[cdk]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Jakub Woźniak]]></dc:creator>
            <pubDate>Fri, 28 Feb 2020 11:28:25 GMT</pubDate>
            <atom:updated>2020-02-29T21:40:05.160Z</atom:updated>
            <content:encoded><![CDATA[<p>AWS Cloud Development Kit is a software framework which allows you to define and provision your cloud application resources. It was announced in 2018, but the first stable version was released in July 2019.</p><p>We’ve been observing this project since its beginning, but only recently we’ve decided to use it as our first-to-go Infrastructure as Code tool, also for business-critical applications. About our initial thoughts, you can read here:</p><p><a href="https://medium.com/nordcloud-engineering/aws-cdk-a-glimpse-into-the-future-90db660f8a89">AWS CDK — a glimpse into the future.</a></p><p>Some time has passed, we are running a few applications with CDK and constantly fighting with new obstacles on our way to achieving the ultimate guideline how to define and deploy our software in Nordcloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*JjoP7OsyGNxk11VI" /><figcaption>Photo by Jantine Doornbos</figcaption></figure><p>We have to admit that CDK allowed us to significantly increase the speed of development. We don’t need to spend numbers of hours on writing and reviewing tons of CloudFormation code, simple constructs written in a developer-friendly way make things easier. Of course, only if you know what’s the result of some of the constructs. YAML is not as easy to read, reviewing multiple stacks is painful for your eyes and it’s hard to spot an error.</p><p>We have tried almost every tool that’s existing on the market. Terraform proved to be a very powerful tool for Anything as Code. When you deal with boring stuff — like VPCs and virtual machines — then it’s ok, but we are a truly cloud-native company and for us having a running EC2 instance should be considered as a last resort. If you need to set up a terraform stack (remote state, Dynamo as a lock) and define your Lambdas + AppSync or API Gateway in HCL — please, no. Even after simplifying stack deployment and preparing multiple reusable modules, it was still a “no-no” from our developers.</p><p>CloudFormation’s code is long and repeatable, so Troposphere was also a valid option. It was like Cloud Development Kit in early stages because that was just CloudFormation written in Python, but we could use everything that comes with this language, including loops or writing our modules, eg. for VPC and networking. Maybe it wasn’t an elegant solution, but it simplified our life enough to love it back then.</p><p>Last but not least, Serverless Framework, something different but created for developers to enable their cloud-native solutions. Super easy to provision and manage serverless workloads with APIs in REST and GraphQL. Unfortunately, Lambda is not enough and sometimes we need to have additional resources, creating them in serverless.yml wasn’t the best idea, as it led us maintenance hell. Solution? Additional stacks in pure CloudFormation, more steps to CI/CD pipelines, rollback procedures and more.</p><p>Let’s get back to Cloud Development Kit. Having another layer of abstraction on top of cloud resources is an outstanding idea because now we connect components, not just simple building blocks. Sometimes we don’t even expect it to hide low-level operations under simple methods, eg. how to allow a Security Group to access RDS database?</p><pre>instance.connections.allowDefaultPortFrom(clientSecurityGroup);</pre><p>At first, we were looking for an operation that would allow us to get a Security Group that RDS is deployed in and then call a method to allow traffic from another group. Property connections has a lot of methods that will do that for you, so no need to think about this Security Group that was created automatically and never shown to you. Awesome, right?</p><p>The concepts of Applications and Environments are worth mentioning. You can easily deploy your code to multiple regions, just iterate over the list of regions you want your stack to be deployed in and create an object for each of the items. Unfortunately, be careful when specifying regions and accounts in the application definition. CDK during the synthesis process will make API calls to those accounts (and fail if you don’t have such credentials) to check the number of AZs.</p><p>Additionally, we have found CDK not only useful as a deployment tool but as a method for maintaining reusable CloudFormation templates. It’s much easier to write a few lines of TypeScript code and use cdk synthto generate a YAML file that can be stored and then easily deployed by other people. That’s how our “terraform startup stack” works. We wrote a simple CDK app which generates a stack consisting of S3 bucket, DynamoDB table and lots of IAM/KMS policies, then we’ve published it to our colleagues as a YAML file, so they don’t have to install any additional tools.</p><p>The availability of languages to choose from is also a nice touch but at the same time a curse. Most of our developers speak Python fluently, so it would be a no-brainer to choose it as our main language for CDK Apps. Still, we feel that TypeScript receives more love from the community as the primary language of all constructs. Libraries for remaining languages are delivered with <a href="https://github.com/aws/jsii">JSII</a>, so they can maintain a single codebase and consistent API. If you want to be as cool as them, then you need to write your constructs in TypeScript so they can be translated. Moreover, when debugging your Python code it’s always funny to see a JavaScript stack trace as an error. In the result, you will need to check the original source code for any undocumented features you will encounter.</p><p>Speaking of undocumented features, CDK is still under heavy development, so sometimes the documentation might be a little bit misleading. There was a moment when you could read about getting value from AWS Systems Manager Parameter Store during the synthesis process, but it wasn’t available! Fortunately, now it’s much better and most of the examples are up-to-date as CDK is more and more mature.</p><p>It’s unclear how should we build CI/CD pipelines for CDK applications. We always want to build an artifact that can be deployed across all of our stages without making any changes. It’s to make sure that the same package that comes from development environments is eventually deployed on production systems. We would like to avoid building our software on systems with access to AWS accounts. CDK introduces a Cloud Assembly concept and it works for simple applications, but when you want to use Environments or Context, things are getting complicated and as mentioned before — it starts making API calls. You need to hardcode a lot of values in context files. There is no easy way to create a CloudFormation Parameter and set its value during deployment. Hope it will change in the future.</p><p>Cloud Development Kit has proven to be a valuable framework for our teams. It required some changes in our mindset, but honestly — having these constructs and simplified templates is worth it. Sometimes we dream about being able to write in a truly declarative programming language like… Prolog! 😃 It’s great that the result of our code is a CloudFromation template, so there’s always an exit plan. It would be nice to see CDK able to deploy resources to other cloud vendors, still using their native tooling. We all encourage you to try the Cloud Development Kit and share your thoughts with us!</p><p>At Nordcloud we are always looking for talented people. If you enjoy reading this post and would like to work with public cloud projects on a daily basis — check out our open positions <a href="https://nordcloud.com/careers/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72fc082ab930" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nordcloud-engineering/our-way-to-cloud-development-kit-in-production-72fc082ab930">Our way to Cloud Development Kit in production</a> was originally published in <a href="https://medium.com/nordcloud-engineering">Nordcloud Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS CDK — a glimpse into the future.]]></title>
            <link>https://medium.com/nordcloud-engineering/aws-cdk-a-glimpse-into-the-future-90db660f8a89?source=rss-82fc5d18e6c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/90db660f8a89</guid>
            <category><![CDATA[cloudformation]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[cloud-development-kit]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <dc:creator><![CDATA[Jakub Woźniak]]></dc:creator>
            <pubDate>Tue, 12 Feb 2019 13:42:31 GMT</pubDate>
            <atom:updated>2019-02-12T14:43:26.862Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS CDK — a glimpse into the future.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*81YT6l1fptvT58Xq9bgiVg.jpeg" /></figure><p>Since the announcement of the AWS Cloud Development Kit (CDK) in August 2018, we were excited about using it in production-ready environments. Unfortunately, since it’s still in developer preview, we shouldn’t really do that for business-critical applications, so we decided not to play with it outside of our playgrounds. Then, a really good chance happened — we had to build a roadmapper tool for internal use.</p><p>This is a follow-up to our first article about our roadmapper tool. If you haven’t seen it yet, you should absolutely read it.</p><p><a href="https://medium.com/nordcloud-engineering/how-we-built-a-roadmapper-tool-in-just-3-hours-using-amplify-and-ci-cd-pipelines-45c3826feca6">How we built a roadmapper tool in just 3 hours using Amplify and CI/CD pipelines.</a></p><h3>What’s the deal with AWS CDK?</h3><p>The AWS Cloud Development Kit is a new way to define your infrastructure by using an imperative programming language. Developers can choose from 4 supported languages: Java, JavaScript, TypeScript and C#. Your code is translated into CloudFormation template and deployed on AWS account using a simple and very friendly CLI (Command Line Interface) — AWS CDK Toolkit.</p><p>CDK is an additional layer of abstraction on top of CloudFormation resources. It comes with an AWS Construct Library, which consists of reusable components (constructs) that integrate multiple cloud services and follow some best-practices out of the box. Constructs can be used together in Stacks and Apps —which make the project structure. This is a new way of defining cloud infrastructure, which is much simpler and allows e.g. developers to provision needed resources easily, without deep knowledge about complicated services like Identity and Access Management (IAM).</p><h3>Let’s build something for fun</h3><p>Back to our case — Roadmapper was pretty simple, so there weren’t many resources needed. Let’s list everything that is necessary to run this app and review it:</p><ul><li>S3 bucket for the Markdown files</li><li>S3 bucket for the Application code</li><li>Cloudfront distribution, because we want a custom domain with TLS certificate for the S3 bucket</li><li>Cognito for identities</li><li>Some IAM roles for people accessing S3 buckets</li></ul><p>Above I can see three things I don’t like in CloudFormation, because they require thinking while writing the code: Cognito, CloudFront and IAM. CDK promised me easy encapsulation of AWS best practices, so let’s see if it’s true.</p><p>Of course, I don’t want it to be too easy, also CDK’s supported languages do not include my favourite ones, so I need to choose something I don’t really know or like… so let’s go with TypeScript, looks pretty nice and I can ask my frontend colleagues for help when dealing with syntax errors.</p><p>After learning the basics of TypeScript I started coding the definition of S3 bucket for Markdown files. It looks like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3cd365ff28bf2325cda23fd97a0349b4/href">https://medium.com/media/3cd365ff28bf2325cda23fd97a0349b4/href</a></iframe><p>Of course, it had to be a little bit difficult for beginners. First line — awesome, just created a Bucket object, but then I had to configure CORS (oh how I love it ❤️). With some help from our awesome JS geek — <a href="https://medium.com/u/c6166d88381">Kuba Holak</a> and a little bit of googling, I finally managed to access the correct object and override required configuration. We have it! Let’s create another bucket, this time publicly accessible for application code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7bc330636eeec9f3b3a854db83113d28/href">https://medium.com/media/7bc330636eeec9f3b3a854db83113d28/href</a></iframe><p>Wait, that was easy. I just had to use grantPublicAccess and… it’s done. I’m starting to like it. Cognito Identity Pool? Just a few lines of code. Okay, let’s move to the hard part — IAM roles. I need my authenticated users to access S3 bucket with Markdown files. I need to create this role and give its ARN (Amazon Resource Name) to Cognito object.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba3538a0c2e01779423a122ca0808278/href">https://medium.com/media/ba3538a0c2e01779423a122ca0808278/href</a></iframe><p>I believe that most of my struggle comes from my unfamiliarity with TypeScript. I could create a Role that can be assumed by FederatedPrincipal that I need to know. Not as easy as promised, but still pretty readable. Then it was smooth, add a statement with a policy that allows sts:AssumeRoleWithWebIdentity , but the last line is what shows what CDK is capable of — bucket.grantRead! Now this role is capable of accessing S3 bucket for reading! 📖</p><p>The last thing I need to define is a CloudFront distribution.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fad6b423e8da2bd4cea0965a79a5359c/href">https://medium.com/media/fad6b423e8da2bd4cea0965a79a5359c/href</a></iframe><p>Pretty clear, I need an instance of CloudFrontWebDistribution with an origin pointing to S3 bucket that I have at my bucket variable. For alias configuration, I use values from the settings file. As it’s a React application, for every 403 error I redirect it as 200 OK serving index.html . Wait, is that enough? Not bad, still need to create things with simple cdk deploy and <em>voilà. </em>Our application is up and running.</p><h3>Best practices out of the box</h3><p>As a Cloud Architect, I wouldn’t be myself if I didn’t check the output of cdk synth . Our template consists of roughly 200 lines of code (in YAML). IAM policies look tight and secure, access is granted only to specified resources and for a limited set of actions. Cloudfront distribution has some nice default options enabled. The good thing is that this is a 100% correct Cloudformation template which is still easily readable by a human. If I don’t want to use CDK anymore, I will just take this template and modify it on my own.</p><p>Our first CDK-based application is ready and it was a pretty good experience. Of course, there are always some flaws, like having to debug my code for 2 hours because I didn’t notice that in the meantime there was a new release with breaking changes, but it’s ok for a tool under heavy development. I wouldn’t recommend it yet for production systems, but I encourage everyone to play with it and get familiar, as in the future it might be a very good way to manage your cloud infrastructure.</p><p>At Nordcloud we are always looking for talented people. If you enjoy reading this post and would like to work with public cloud projects on a daily basis — check out our open positions <a href="https://nordcloud.com/careers/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90db660f8a89" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nordcloud-engineering/aws-cdk-a-glimpse-into-the-future-90db660f8a89">AWS CDK — a glimpse into the future.</a> was originally published in <a href="https://medium.com/nordcloud-engineering">Nordcloud Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Decoupling IaC with SSM Parameter Store]]></title>
            <link>https://medium.com/nordcloud-engineering/decoupling-iac-with-ssm-parameter-store-8f38feae3936?source=rss-82fc5d18e6c2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f38feae3936</guid>
            <category><![CDATA[simple-systems-manager]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Jakub Woźniak]]></dc:creator>
            <pubDate>Fri, 25 Jan 2019 09:24:50 GMT</pubDate>
            <atom:updated>2019-01-30T10:15:09.041Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6obSpu0BjWBqG5VYGX_THQ.png" /></figure><p>Have you ever heard about AWS Systems Manager Parameter Store? If not, you should really get yourself updated as it is one of the most problem-solving services from the Amazon’s cloud. Basically, it’s a key-value store for your app’s configuration. It also works great with KMS and IAM, so you can have your data secured in a proper manner. However, using it just for app configs seems pretty boring, let’s get it to the next level! ☁️</p><blockquote>If it still does not ring the bell, you can check out our <a href="https://medium.com/@tdi/ssm-parameter-store-for-keeping-secrets-in-a-structured-way-53a25d48166a">old article</a> about how we use Parameter Store for provisioning environment variables in containerized workloads.</blockquote><p>What’s good about Parameter Store is that it is supported by almost everything you can imagine when working with AWS. It’s easy to create entries and to read them while provisioning your infrastructure. One of my original problems was how to use Terraform and the Serverless Framework together in a one project. I wanted to create my VPC in Terraform and then let serverless framework know in which subnets and security groups it should deploy my functions. I don’t like hardcoding stuff in CI/CD pipelines, so creating subnets and then putting their ids in pipeline’s config is not <em>my </em>way, it has to be dynamic.</p><h3>Multiple tools</h3><p>What should cloud ninja do? Let terraform execute a script to setup a Serverless’ pipeline? Nah, unnecessary external dependencies. Maybe read terraform’s remote state? Looks nice, but in the end — too complicated. We need something simple and you already know the answer. Let’s use the Parameter Store to decouple communication between different tools.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5911b0df8f2af3ec7882fd8469684bd9/href">https://medium.com/media/5911b0df8f2af3ec7882fd8469684bd9/href</a></iframe><p>In terraform file I can create resource type aws_ssm_parameter<em> </em>and put interpolated values based on my infrastructure. Then, in serverless configuration, I can read it by using $(ssm:…) variable. Things get a little bit trickier when you need to parse a list, e.g. subnet ids. For terraform part I use a simple join and then split it with Fn::Split — a CloudFormation intrinsic function. Isn’t that awesome? ❤️</p><h3>Overcome CloudFormation limits</h3><p>If it’s not in IaC, then it shouldn’t be in your AWS account. CloudFormation is an amazing tool that we use heavily in Nordcloud. I really like creating multiple stacks and exporting values from one layer to another, so I keep everything organized in separate files, e.g. VPCs, ECS cluster, Application stack.</p><p>Here comes the not-so-nice thing. If you export a value in one stack and then import it in another stack, you cannot update the first stack (if it requires a change in stack’s output). Use case? Let’s say we have stack A with SQS queue and its URL is exported. Then we create stack B which reads this value and sets it as Lambda’s environment variable.</p><p>Now we want to recreate this SQS queue, say, just because we don’t like the name we chose for it. It won’t work, as it would require a change in exported output that is already in use — so you would need to delete all the stacks that import from it. This is a very common problem, where CloudFormation import/export might be in fact tight coupling.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a3627081e3e7d0f5fb6ca631eabda6e/href">https://medium.com/media/6a3627081e3e7d0f5fb6ca631eabda6e/href</a></iframe><p>By using SSM Parameter to pass the SQS name, we can introduce loosely coupled binding. There, only parameter name is immutable, but its value can be changed anytime. Fewer dependencies, more flexibility, and that’s what cloud is all about.</p><h3>This machine has no brain, use your own.</h3><p>These CloudFormation limitations are there for a reason, so breaking them is not always the best idea. You should always think if it’s okay to do that so you won’t get your infrastructure in a messy state even when using IaC for everything. Values in Parameter Store can be changed manually and you won’t even notice, so keep your IAM secured and <strong>always follow the principle of least privilege</strong>. Have your application prepared for that kind of changes, eg. read parameters during container startup and let it fail if something changes.</p><p>Parameter Store is so versatile that it makes it to the top of my favourite AWS services. Simple yet powerful and really flexible. It can help you with many different tasks, so don’t bother using it for more than just keeping simple configuration files.</p><p>At Nordcloud we are always looking for talented people. If you enjoy reading this post and would like to work with public cloud projects on a daily basis — check out our open positions <a href="https://nordcloud.com/careers/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f38feae3936" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nordcloud-engineering/decoupling-iac-with-ssm-parameter-store-8f38feae3936">Decoupling IaC with SSM Parameter Store</a> was originally published in <a href="https://medium.com/nordcloud-engineering">Nordcloud Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>