<?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>Forem: Cristian Paul Peñaranda Rojas</title>
    <description>The latest articles on Forem by Cristian Paul Peñaranda Rojas (@kristianpaul).</description>
    <link>https://forem.com/kristianpaul</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%2F157737%2F610e95d0-370b-424d-9aa2-95e2d42a26dc.jpeg</url>
      <title>Forem: Cristian Paul Peñaranda Rojas</title>
      <link>https://forem.com/kristianpaul</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kristianpaul"/>
    <language>en</language>
    <item>
      <title>Computers are</title>
      <dc:creator>Cristian Paul Peñaranda Rojas</dc:creator>
      <pubDate>Sat, 10 Jan 2026 21:25:28 +0000</pubDate>
      <link>https://forem.com/kristianpaul/computers-are-759</link>
      <guid>https://forem.com/kristianpaul/computers-are-759</guid>
      <description>&lt;h2&gt;
  
  
  Technology, Time, and Information
&lt;/h2&gt;

&lt;p&gt;Technology isn’t anything but a reflection of the human inability to do some things.&lt;/p&gt;

&lt;p&gt;Time is usually the limit—and also the path—but I meant it as a barrier, without technology we could not do things that would usually take us time and energy, from sending an email to sending a short message.&lt;/p&gt;

&lt;p&gt;Of course, there are situations where sending a message in person changes everything. It also reduces the chances of deception, but it replaces a poor bandwidth—one that these days isn’t enough for our bodies to be satisfied, catching up with every movement our body makes to communicate.&lt;/p&gt;

&lt;p&gt;So technology, again, involves many means: from actual building blocks, guns, books, instruments, and calculators—by which I mean computers.&lt;/p&gt;

&lt;p&gt;I may be naïve to think that computers were created at all in constrast counting and mathematics were concepts that took a lot of time for humanity to develop. They also take a lot of our brain capacity, so we had to develop signs, tools, and eventually computers to perform these operations faster. This is information, nonetheless. Computers then became the solution—hence, the tool—to process and transport information in a non-natural way, because humans tend to modify the environment to their desires. Information, at least today, is how we interpret the world around us, which is made of the same things—but that’s a topic for other books.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Beginning
&lt;/h3&gt;

&lt;p&gt;Computers don’t seem to grow by themselves—at least not yet—so they are tools we build. They come with two main components: the CPU and the memory. Although the CPU also contains a small amount of memory inside it, additional dedicated resources that are needed to remember and store information. That’s why memory is so important, and basically, it’s what everything is about anyway.&lt;/p&gt;

&lt;p&gt;Time also plays an important role in how a CPU functions. Without time—and specifically without clock crystals—CPUs wouldn’t be able to function, to run, or to perform operations. That’s the basis of what a CPU does: it moves information all the time, basically doing math and logic. This is probably logic we already perform in the world, but at a simpler and more fundamental level—not as advanced as controlling traffic, though that’s a good analogy.&lt;/p&gt;

&lt;p&gt;We’re trying to be fundamental here. Computers figure out the most repetitive operations our minds perform and convert them into machinery and tools that harvest memory (computer memory), so programs can exist. These programs are compilations of instructions, which is (again) information—but different from a book that is meant to be read (at least in principle). These words (programs) are actually able to modify and/or create information (more words).&lt;/p&gt;

&lt;p&gt;All of this happens at speeds that seem to be limited only by physical constants, like the speed of light—how fast information can travel and how fast it can be accessed. Since this is a classification exercise in a way, the more information you put in the same place, the harder it becomes to access it due to physical limitations. It’s good to note that bridges suffer from related problems due usage but don’t fall down because they are big, and maintenance can be performed—or they are eventually replaced.&lt;/p&gt;

&lt;p&gt;With computers and their bridges, we’re crossing limits of the things we can’t see with the human eye. All of this is happening in spaces so small that even more constraints and unknowns appear. Yet here is humanity, trying to build CPUs and memory smaller every day so we can keep piling information into the so-called cloud—which is just a bunch of computers living in the same place, connected by wires that transport light and electricity, dealing with information through programs.&lt;/p&gt;

&lt;p&gt;These programs are written by humans—for now—but they may eventually help humans write faster and think more, which is what we want, I think, anyway.&lt;/p&gt;

&lt;h3&gt;
  
  
  So What Are We Doing With Computers These Days?
&lt;/h3&gt;

&lt;p&gt;I’m afraid to say: almost anything.&lt;/p&gt;

&lt;p&gt;Humanity has been able to build and continue physically building larger and larger structures—houses, bridges (again), ships, cars, rockets—and, well, humanoid-like structures called robots. These can lift boxes and dance, shadowing their creators’ movements, and eventually becoming more aware of their surroundings. Maybe one day we’ll beat nature and create humans made of different machinery—but this isn’t a novel, so that’s for another kind of book.&lt;/p&gt;

&lt;p&gt;What’s next from here? Well, it’s up to you, I think. Computers are becoming more popular every day, and that comes with the cost of not even knowing what they are—or what they exist for—like reading this text.&lt;/p&gt;

</description>
      <category>technology</category>
      <category>computers</category>
      <category>philosophy</category>
      <category>writing</category>
    </item>
    <item>
      <title>IPv6 on AWS - Flat network connection between my local computer lab and the cloud</title>
      <dc:creator>Cristian Paul Peñaranda Rojas</dc:creator>
      <pubDate>Tue, 26 Oct 2021 02:46:34 +0000</pubDate>
      <link>https://forem.com/kristianpaul/ipv6-on-aws-flat-network-connection-between-my-local-computer-lab-and-the-cloud-p85</link>
      <guid>https://forem.com/kristianpaul/ipv6-on-aws-flat-network-connection-between-my-local-computer-lab-and-the-cloud-p85</guid>
      <description>&lt;p&gt;I like playing and building on the AWS cloud, but also enjoy  developing and prototyping on my local lab full mostly of Raspberry Pi + other embedded devices.&lt;/p&gt;

&lt;p&gt;From time to time I managed to follow a common pattern. Deploying a load balancer either in AWS or from my public IPv4 address as a way to expose to the world my applications and also communicate back and forth between the cloud and my local network.&lt;/p&gt;

&lt;p&gt;I always keep in mind that the internet was designed as a flat data network, delivering a multitude of protocols and services between equal peers [1].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;One of the benefits of IPv6 is not having NAT, this simplifies the current client server model inherit from IPv4 and gives back peer to peer communication&lt;/em&gt;&lt;/strong&gt; which is something I appreciated and use in my local network, and now I can also do against the AWS Cloud.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is my setup&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;I started by creating a IPv6 tunnel (since my ISP still doesn't provide IPv6 addresses), I signed up with &lt;a href="https://tunnelbroker.net/" rel="noopener noreferrer"&gt;https://tunnelbroker.net/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And created a tunnel against their closest tunnel server:&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%2Fi4huvc2viy1qncivlg6q.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%2Fi4huvc2viy1qncivlg6q.png" alt="Image description" width="800" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also assigned a /48 prefix to the tunnel, this is important for the next steps as I'll not just get the tunnel working on a single server but also routing and assigning ipv6 addresses to my Linux devices lab.&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%2F3xnpg4w6jma0u3vl0ewu.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%2F3xnpg4w6jma0u3vl0ewu.png" alt="Image description" width="651" height="629"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Getting tunnel setup is simple as copying their instructions for my OS.&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%2F3acupq6sx4nhvvvraen4.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%2F3acupq6sx4nhvvvraen4.png" alt="Image description" width="550" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(note that local address it's replaced from your public IPv4 address to the local IPv4 of your system)&lt;/p&gt;

&lt;p&gt;In order to get IPv6 address from my routed prefixes (the /48 one) have to install  &lt;code&gt;radvd&lt;/code&gt; and configure it as follows:&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%2F71qfncgq1tbsfdsbhary.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%2F71qfncgq1tbsfdsbhary.png" alt="Image description" width="408" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;strong&gt;&lt;em&gt;After that, everything is set up on my network which is now IPv6 ready.&lt;/em&gt;&lt;/strong&gt;*&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%2F81zyn3b4a1uoyqngsxgc.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%2F81zyn3b4a1uoyqngsxgc.png" alt="Image description" width="800" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now is time to create a network in AWS Cloud, for this I'll use the following Typescript code snippet so that AWS CDK will create a VPC with 3 public subnets. This a really good abstraction and time saver:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import * as cdk from '@aws-cdk/core';
import * as ec2 from '@aws-cdk/aws-ec2';


export class NetStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    // The code that defines your stack goes here
    const vpc = new ec2.Vpc(this, 'VPC', {
       subnetConfiguration: [
          {
            cidrMask: 24,
            name: 'public',
            subnetType: ec2.SubnetType.PUBLIC,
          }
       ]
    });  }
}

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

&lt;/div&gt;



&lt;p&gt;IPv6 support in CDK is not ready, so I'll enable IPv6 in my VPC and subnets using the AWS CLI as follows:&lt;/p&gt;

&lt;p&gt;Requesting IPv6 CIDR:&lt;/p&gt;

&lt;p&gt;Get the VPC ID first&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws cloudformation describe-stack-resources --stack-name YourNamedStack --region us-east-2 | grep -oP "vpc-\w+" 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then request IPv6 CIDR&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ec2 associate-vpc-cidr-block --vpc-id vpc-00000000000000000 --amazon-provided-ipv6-cidr-block
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And save the IPv6 /56 block, this is needed next.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ec2 describe-vpcs --vpc-id vpc-00000000000000000 --region us-east-2 | grep "Ipv6CidrBlock"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The /56 block is split in smaller /64 prefixes, then we assigned two of them to our subnets.&lt;/p&gt;

&lt;p&gt;We'll need to get the subnets IDs first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws cloudformation describe-stack-resources --stack-name NetStack --region us-east-2 | grep -oP "subnet-\w+"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then assign two IPv6 /64 blocks to our previous listed subnets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ec2 associate-subnet-cidr-block --subnet-id subnet-00000000000000000 --ipv6-cidr-block 2600:1f16:dd9:e100::/64 
aws ec2 associate-subnet-cidr-block --subnet-id subnet-00000000000000001 --ipv6-cidr-block 2600:1f16:dd9:e101::/64 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable IPv6 automatic addressing (very important for later)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ec2 modify-subnet-attribute --subnet-id subnet-00000000000000000 --assign-ipv6-address-on-creation
aws ec2 modify-subnet-attribute --subnet-id subnet-00000000000000001 --assign-ipv6-address-on-creation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Routing is also necessary and our last step before start using IPv6 on an instance&lt;/p&gt;

&lt;p&gt;Once again, we just need resources ID, this time route tables and internet gateway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws cloudformation describe-stack-resources --stack-name NetStack --region us-east-2 | grep -oP "rtb-\w+"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Internet gateway is important when modifying the route tables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws cloudformation describe-stack-resources --stack-name NetStack --region us-east-2 | grep -oP "igw-\w+"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then adding IPv6 default route (::/0) to reach the internet.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ec2 create-route --route-table-id rtb-00000000000000000 --destination-ipv6-cidr-block ::/0 --gateway-id igw-00000000000000000
aws ec2 create-route --route-table-id rtb-00000000000000001 --destination-ipv6-cidr-block ::/0 --gateway-id igw-00000000000000000 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, if I launch an ec2 instance either from the console or with the following snippet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;aws ec2 run-instances --image-id ami-08e6b682a466887dd --count 1 --instance-type t4g.micro  --iam-instance-profile Name=AWSCloud9SSMInstanceProfile  --subnet-id subnet-00000000000000000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Get a session against it, I can validate that it actually got a IPv6 address.&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%2Fzqkxguflrtj6mjunhvjo.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%2Fzqkxguflrtj6mjunhvjo.png" alt="Image description" width="800" height="281"&gt;&lt;/a&gt;&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%2Fux0zg98fsnnw4bveskxc.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%2Fux0zg98fsnnw4bveskxc.png" alt="Image description" width="800" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If I run netcat on either side of my network (cloud and local),  I can communicate between both servers as if they were in the same network, in some way they are now :D.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now I can communicate with my AWS really easily, and I'm also on my way to transition to IPv6.&lt;/p&gt;

&lt;p&gt;It's important to *&lt;strong&gt;&lt;em&gt;modify Security Groups&lt;/em&gt;&lt;/strong&gt;* to allow connections from my /48 IPv6 network segment, or the whole IPv6 internet if you want to just host some web applications there too with AAAA records ;-)&lt;/p&gt;

&lt;p&gt;I'm planning to use this setup to play with ECS Anywhere soon.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There are some considerations to keep in mind:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Latency is around 200ms, I might be due to my physical location.&lt;/li&gt;
&lt;li&gt;Security Groups needs to be adjusted on the instance that run in AWS side &lt;/li&gt;
&lt;li&gt;Review your local IPv6 router firewall as well for security reasons&lt;/li&gt;
&lt;li&gt;Use TLS all the times, this is not a VPN.&lt;/li&gt;
&lt;li&gt;I'm using my pi-hole box to host the tunnel and provide IPv4 to IPv6 routing on my local lab.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope you enjoy reading this.  &lt;/p&gt;

&lt;p&gt;[1] &lt;a href="http://luca.ntop.org/n2n.pdf" rel="noopener noreferrer"&gt;http://luca.ntop.org/n2n.pdf&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
      <category>cli</category>
    </item>
    <item>
      <title>AWS CDK - Coding a Virtual Machine in the Cloud</title>
      <dc:creator>Cristian Paul Peñaranda Rojas</dc:creator>
      <pubDate>Mon, 26 Oct 2020 03:11:42 +0000</pubDate>
      <link>https://forem.com/kristianpaul/aws-cdk-coding-a-virtual-machine-in-the-cloud-9de</link>
      <guid>https://forem.com/kristianpaul/aws-cdk-coding-a-virtual-machine-in-the-cloud-9de</guid>
      <description>&lt;p&gt;I started following AWS CDK (Cloud Development Kit) news and documentation for a while now. That's usually my lazy strategy when a new AWS product is launched, I finally decided that I wanted to start using it and create something that I'm familiar with and  also find useful.&lt;/p&gt;

&lt;p&gt;One of my favourites AWS products is &lt;em&gt;EC2&lt;/em&gt;, for multiple reason:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compute is Universal, it have the potential to make many things with a server running &lt;em&gt;Linux&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;EC2 Administration in AWS can be much more elastic, there are some additions from AWS System Manager that I enjoy using:

&lt;ul&gt;
&lt;li&gt;No more SSH!, AWS SSM provides &lt;em&gt;Session Manager&lt;/em&gt; instead that is Web Console, CLI and API friendly.&lt;/li&gt;
&lt;li&gt;Parameter Store is handy for keeping configuration values in a safe place outside the instance.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;User data for provisioning, because some bash script with a few commands always gets the job done.&lt;/li&gt;

&lt;li&gt;Elastic IPs (also knows as Public IP), probably the most simple way to connect your application to the internet!&lt;/li&gt;

&lt;li&gt;Amazon Linux 2, one less thing to worry about because AWS maintains a Redhat/Centos like distribution.&lt;/li&gt;

&lt;li&gt;All the goodies of EBS and snapshots.&lt;/li&gt;

&lt;li&gt;Spot Instances, because running your servers could be really affordable if your service is smart enough to handle interruptions.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;So, I decided to deploy a single instance from Python code using CDK with all the AWS cool stuff to easy the management in around 60 lines of code.&lt;/p&gt;

&lt;p&gt;This is a snippet of what you're going to find, &lt;em&gt;instance creation&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        instance = ec2.Instance(self, "Instance",
            instance_type=ec2.InstanceType("t3.nano"),
            machine_image=amzn_Linux,
            vpc = vpc,
            role = role
            )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One common issue when using &lt;em&gt;user data&lt;/em&gt; to install software is that eventually it hits a limit, CDK Assets allows me to invoke that script from a separate file and also handles the assets management in S3 for us.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        asset = Asset(self, "Asset", path=os.path.join(dirname, "configure.sh"))
        local_path = instance.user_data.add_s3_download_command(
            bucket=asset.bucket,
            bucket_key=asset.s3_object_key
        )

        instance.user_data.add_execute_file_command(
            file_path=local_path
            )
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the full code example for getting that instance up and running:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/aws-samples/aws-cdk-examples/blob/master/python/ec2/instance/" rel="noopener noreferrer"&gt;EC2 Instance Code Example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope this gives you an idea of how powerful CDK in terms of &lt;em&gt;describing infrastructure&lt;/em&gt; and the amount of time that saves if you where using the Python SDK or Cloudformation previously. &lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>cloud</category>
      <category>python</category>
    </item>
  </channel>
</rss>
