<?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[DNX Labs - Medium]]></title>
        <description><![CDATA[A cloud-native company - Medium]]></description>
        <link>https://medium.com/dnx-labs?source=rss----bef899c96973---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>DNX Labs - Medium</title>
            <link>https://medium.com/dnx-labs?source=rss----bef899c96973---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 18 May 2026 06:31:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/dnx-labs" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[What DevOps is and how its contributes to the Digital Transformation]]></title>
            <link>https://medium.com/dnx-labs/what-devops-is-and-how-its-contributes-to-the-digital-transformation-f272a5f82212?source=rss----bef899c96973---4</link>
            <guid isPermaLink="false">https://medium.com/p/f272a5f82212</guid>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[dnx-solutions]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Flavio Oliveira]]></dc:creator>
            <pubDate>Thu, 25 Feb 2021 07:29:32 GMT</pubDate>
            <atom:updated>2021-02-25T07:29:32.003Z</atom:updated>
            <content:encoded><![CDATA[<h3>What DevOps is and how it contributes to the Digital Transformation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jGOwUXVjYC-iLPvjZIuywA.png" /></figure><p>We live in a Digital Transformed world, where technology allows new forms of work in a high speed changing environment. Traditional businesses are challenged by start-ups and tech companies, with innovative and disrupting business models. New apps and services are created and become obsolete in a blink of an eye. This new generation of consumers has the power of choice on their hand since they are kids. COVID-19 brought a new normal to the way we live putting companies under pressure to change or die, and the technology is the great lever, even though at the same time create new challenges.</p><p>In this scenario, every day new ideas and insights come from innovators and are almost immediately copied by followers to become the new reality with innovations on top of it, creating a virtuous cycle of continuous improvement also new ways of doing things. Mobile, apps, tablets, and the internet of things are just the tools to live in the new normal.</p><p>The time between coming up with ideas or insights and its materialisation has to be shorter than ever before. Otherwise, the momentum is lost while competitors are winning space. When consumers face errors and problems using the new technologies, the users don’t come back, and that can bring a company to lose its lead</p><h3>Challenges and solutions to the new tech</h3><p>In order to respond to this fast speed, connected world, the traditional development, test, production and operation models does not fit anymore, creating bottlenecks and friction when speaking of the relationship among teams. Each of the technology areas ends up becoming a silo with strict interaction rules.</p><p>At one side of the ring, we got development, trying to answer in its best, in a faster way, the business insights, using agile methodologies, modern architectures and languages. On the other corner, IT operations, in a quest for stability and control for the production environments, creating processes and procedures to ensure that every piece of code released to production would be stable in order to avoid incidents, not forgetting to protect what is already running.</p><p>This enormous abyss between Development and Operations brings titanous clashes, slowing down the delivery time and problem resolution.<br>To reduce the friction also allow business ideas to become features to service consumers, the DevOps concept was forged around 2010; a concept that grew and, during the last years, are helping to change the IT landscape.</p><h3>DevOps: concepts advantages</h3><p>It is hard to find a unique definition for DevOps, as sometimes the market is looking at this matter as a group of blind men trying to see an elephant with their hands. Each one touches a different part and have a different view of it.</p><p>First of all, DevOps is a work culture, bringing software development near IT operations, closing the gap between those areas and harvesting the fruits of this gathering.</p><p>DevOps is not a methodology or a tool, but it’s a set of practices, built on top of automation, communication and shared objectives, changing organisational cultures to bringing to life a new way to deliver IT. DevOps includes the whole Design, Build and Operate IT lifecycle, unifying these processes with governance and security serving as its basis, sewed up with automation, on an agile way of work.</p><p>In order to ensure that the business is aligned to this new industrial revolution, with today’s fast information consumption society and, consequently, to the Digital Transformation, there is a pressing need for organisational changes; a big change, of course, that embraces much more than the IT department in itself and even more than the Operations and Development relationship, creating an arc from the business to the consumer.<br>Therefore, IT tends to be seen not only as a support area and more like a part of the business.</p><p>This concept disruption is enormous, as silos must be broken, communication plans must be clear, concise and need to be followed and it is necessary to stop looking just to task executors and starting to see the whole service. When the business starts a more holistic approach to the development, test, production and operation cycle, without barriers between them, they will be, almost automatically, a DevOps business.</p><p>At <a href="https://dnx.solutions/">DNX Solutions</a>, we work to bring a better cloud and application experience for digital-native startups in Australia.</p><p>Our current focus areas are AWS, Well-Architected Solutions, Containers, ECS, Kubernetes, Continuous Integration/Continuous Delivery and Service Mesh and Data Solutions (movement, transformation, lakes, warehouses and analytics). We are constantly hiring cloud engineers for our Sydney office, focusing on cloud-native concepts.</p><p><em>Check our open-source projects at</em> <a href="https://github.com/DNXLabs"><em>https://github.com/DNXLabs</em></a> <em>and follow us on our</em> <a href="https://twitter.com/DNXLabs"><em>Twitter</em></a> <em>or</em> <a href="https://www.linkedin.com/company/dnx-solutions/"><em>Linkedin</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f272a5f82212" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dnx-labs/what-devops-is-and-how-its-contributes-to-the-digital-transformation-f272a5f82212">What DevOps is and how its contributes to the Digital Transformation</a> was originally published in <a href="https://medium.com/dnx-labs">DNX Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Apache Airflow CLI with Amazon MWAA]]></title>
            <link>https://medium.com/dnx-labs/how-to-use-apache-airflow-cli-with-amazon-mwaa-a773edfa0a45?source=rss----bef899c96973---4</link>
            <guid isPermaLink="false">https://medium.com/p/a773edfa0a45</guid>
            <category><![CDATA[apache-airflow]]></category>
            <category><![CDATA[airflow]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[amazon]]></category>
            <dc:creator><![CDATA[Felipe de Mello Rodrigues]]></dc:creator>
            <pubDate>Mon, 15 Feb 2021 06:44:59 GMT</pubDate>
            <atom:updated>2021-02-15T06:50:08.006Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OWfDtifTEfZFKZwK.jpg" /><figcaption>Photo by <a href="https://unsplash.com/@johnschno">John Schnoon </a>on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Amazon MWAA (Managed Workflow for Apache Airflow) was released by AWS at the end of 2020. This brand new service provides a managed solution to deploy Apache Airflow in the cloud, making it easy to build and manage data processing workflows in AWS.</p><p>MWAA enables automatic deployment of all the infrastructure and configuration for <em>Airflow Web Server, Scheduler, Workers, Metadata Database</em> and also the <em>Celery</em> executor combined with <em>SQS,</em> to manage jobs dispatching. Users just need to setup an S3 bucket for<em> DAGs, plugins </em>and <em>Python dependencies</em> (via <em>requirements.txt</em>) and associate its content with the MWAA environment.</p><p>Authentication is also managed by AWS — native integration with IAM and resources can be deployed inside a private VPC for additional security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*8Ewrsb4Nl5a2y50whwGvSQ.png" /><figcaption>Example of an Amazon MWAA architecture deployed inside a VPC</figcaption></figure><p>Since all the resources are deployed by AWS, developers don’t have access to the underlying infrastructure. Consequently, the main interface used by Data Engineers is the <a href="https://airflow.apache.org/docs/apache-airflow/stable/ui.html"><strong>Airflow UI</strong></a>, which is available via public URL or VPC endpoint, depending on the deployment type selected (public or private network).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LHmfcpWWzJSporS3.png" /><figcaption>Example of DAG managed via Airflow UI</figcaption></figure><p>However, Airflow UI is not the <em>only</em> option for interacting with your environment; MWAA also provides support to the <a href="https://airflow.apache.org/docs/apache-airflow/stable/cli-and-env-variables-ref.html"><strong>Airflow CLI</strong></a>. This is a useful option if you want to automate operations to monitor or trigger your DAGs, and in this post I explain how you can best make use of Airflow CLI from an MWAA environment.</p><p>The following content is suitable for those already familiar with the benefits and functionality of Apache Airflow. If you are new to Airflow, or you’re searching for more insights about the advantages of using Amazon MWAA compared to hosting your own environment, I recommend you explore earlier posts on this subject before reading on.</p><h3>The Apache Airflow CLI and its use with Amazon MWAA</h3><p>Airflow has a very rich command-line interface that allows for many types of operation on DAGs, starting services, and support for development and testing.</p><p>Airflow CLI is an interesting maintenance alternative within MWAA, since it allows Data Engineers to create scripts to automate otherwise manual/ repetitive tasks.</p><p>In MWAA, not all commands are supported because as developers we cannot perform operations that might impact server resources or user management (e.g. <em>webserver, scheduler, worker, etc</em>), but all commands related to monitoring, processing and testing DAGs are supported in the current version.</p><p>To check the full list of supported and unsupported commands, refer to the official <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/amazon-mwaa-user-guide.pdf"><strong>User Guide</strong></a>. At the time of writing, this is the status of different commands:</p><h4>List of supported commands</h4><ul><li>backfill</li><li>clear</li><li>dag_state</li><li>delete_dag</li><li>list_dag_runs</li><li>list_dags</li><li>list_tasks</li><li>next_execution</li><li>pause</li><li>pool</li><li>render</li><li>run</li><li>show_dag</li><li>task_failed_deps</li><li>task_state</li><li>test</li><li>trigger_dag</li><li>unpause</li><li>variables</li><li>version</li></ul><h4>List of unsupported commands</h4><ul><li>checkdb</li><li>connections</li><li>create_user</li><li>delete_user</li><li>flower</li><li>initdb</li><li>kerberos</li><li>list_users</li><li>resetdb</li><li>rotate_fernet_key</li><li>scheduler</li><li>serve_logs</li><li>shell</li><li>sync_perm</li><li>upgradedb</li><li>webserver</li><li>worker</li></ul><h3>How to trigger a CLI command from Amazon MWAA</h3><p>To access the Airflow CLI from MWAA, there are four basic steps:</p><ol><li>Authenticate your AWS account via AWS CLI;</li><li>Get a CLI token and the MWAA web server hostname via AWS CLI;</li><li>Send a post request to your MWAA web server forwarding the CLI token and Airflow CLI command;</li><li>Check the response, parse the results and decode the output.</li></ol><p>This sounds complicated but is actually a fairly straightforward process. Let’s deep dive and investigate each step in detail.</p><h4>1. Authenticate to your AWS account</h4><p>To access your MWAA cluster, you must install and configure AWS CLI, granting access to the account where your environment is deployed.</p><p>If you are not used to this process, read the <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html"><strong>AWS CLI User Guide</strong></a>, which explains how you can configure a profile in your AWS CLI and grant access to your accounts.</p><h4>2. Get CLI token and MWAA web server hostname via AWS CLI</h4><p>The next step is to collect a CLI Token which is a Bearer token used for authentication in your MWAA environment. When first authenticating in the AWS account we can also authenticate to the MWAA environment and collect the token which grants access to perform Airflow CLI commands, by entering the following command :</p><pre>aws mwaa create-cli-token --name <strong>$MWAA_ENVIRONMENT</strong></pre><p>Remember to assign the name of your MWAA environment by exporting the environment variable <strong>$MWAA_ENVIRONMENT</strong>.</p><pre>export MWAA_ENVIRONMENT=my_environment_name</pre><p>If the command is successfully executed, you should receive a JSON response with two attributes:</p><pre>{<br>  &quot;CliToken&quot; : &quot;&quot;,<br>  &quot;WebServerHostname&quot; : &quot;&quot;<br>}</pre><p>Parse the results and store them in other environment variables for later use. I suggest the following names:</p><ul><li><strong>$CLI_TOKEN</strong></li><li><strong>$WEB_SERVER_HOSTNAME</strong></li></ul><h4>3. Send a post request to your MWAA web server forwarding the CLI token and Airflow CLI command</h4><p>Finally, using the CLI token and the web server hostname, you can trigger your Airflow CLI command via curl request by following the example below:</p><pre>curl \<br>  --request POST &quot;https://<strong>$WEB_SERVER_HOSTNAME</strong>/aws_mwaa/cli&quot; \<br>  --header &quot;Authorization: Bearer <strong>$CLI_TOKEN</strong>&quot; \<br>  --header &quot;Content-Type: text/plain&quot; \<br>  --data-raw &quot;<strong>$AIRFLOW_CLI_COMMAND</strong>&quot;</pre><p>Notice we assigned the environment variables acquired from the previous step ($CLI_TOKEN and $WEB_SERVER_HOSTNAME) and also published a third variable with the name <strong>$AIRFLOW_CLI_COMMAND</strong>. In this variable we send the Airflow command to be performed by the CLI, for example, if you want to execute the following command:</p><pre>airflow list_dags</pre><p>The variable <strong>$AIRFLOW_CLI_COMMAND</strong> should be filled with:</p><pre>list_dags</pre><p><strong><em>Important note:</em></strong> if your MWAA environment is published in a private network you can’t perform the curl request via public internet; a VPN must be used to establish the connection between your local machine and the VPC endpoint, or you may need to execute this command from another computing resource placed inside of the same VPC.</p><h4>4. Check the response, parse the results and decode the output</h4><p>Finally, the last step is to parse and decode the output of the curl request. If everything went well you should have received a JSON response with the following attributes:</p><pre>{<br>  &quot;stderr&quot; : &quot;&quot;,<br>  &quot;stdout&quot; : &quot;&quot;<br>}</pre><p>Notice both attribute values are encoded in <strong>Base64</strong>. Remember to decode the results to collect the final output from Airflow CLI. A simple way to achieve that is by using the command:</p><pre>base64 -d</pre><h3>Automating all the steps with a single script</h3><p>In the previous sections we discussed all the steps needed to run a CLI command in MWAA, but now I’ll describe how to combine everything in a single script which enables you to quickly and easily perform CLI calls.</p><p>This is a shell script created for Unix based operational systems (e.g. Linux, MacOS); if you are running Windows you may need to adapt this content or run the script through Windows WSL (Windows Subsystem for Linux).</p><p>Notice I am using <strong>jq</strong> to parse the JSON responses from AWS CLI and the curl request to MWAA, but feel free to adapt the code if you prefer another approach.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d65f018c2036340892ec4ad31dd900bc/href">https://medium.com/media/d65f018c2036340892ec4ad31dd900bc/href</a></iframe><p>The script above collects all the arguments and send it to the curl request by using the variable <strong>$*</strong>. So, if we name this script as airflow-cli.sh and you type the following command in your terminal:</p><pre><strong>airflow-cli.sh</strong> list_dag_runs my_dag_name</pre><p>The MWAA environment will perform the following CLI command:</p><pre>airflow list_dag_runs my_dag_name</pre><p>An interesting trick to improve the user experience is to rename this script as <strong>airflow</strong> and copy it to one of the folders mapped in the local <strong>$PATH</strong> (e.g. <strong>/usr/local/bin/airflow</strong>). In this way you can call the commands in the Airflow CLI by typing:</p><pre>airflow &lt;arguments&gt;</pre><p>Just ensure you don’t have the real Airflow CLI installed, to avoid conflicts.</p><p>If you already have Airflow CLI installed, another option is to run this script from a Docker image and map it to the container local path.</p><h3>Conclusion</h3><p>Amazon MWAA is an incredible service which reduces the complexity of managing an Apache Airflow cluster, thus enabling Data Engineers to focus on DAGs and the data workflow instead of spending endless time on infrastructure.</p><p>The Airflow UI continues to be the primary means of interaction with MWAA, but the additional option of using Airflow CLI allows advanced users to maximise the benefits of MWAA, and take advantage of all the features of a hosted solution.</p><p>I hope you enjoyed this content and make good use of this script in your Amazon MWAA environment!</p><p><strong>References</strong>:</p><ul><li><strong>Amazon Managed Workflows for Apache Airflow — User Guide: </strong><a href="https://docs.aws.amazon.com/mwaa/latest/userguide/amazon-mwaa-user-guide.pdf">https://docs.aws.amazon.com/mwaa/latest/userguide/amazon-mwaa-user-guide.pdf</a></li><li><strong>Using a CLI token</strong>: <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/access-airflow-ui.html#CreateCliToken">https://docs.aws.amazon.com/mwaa/latest/userguide/access-airflow-ui.html#CreateCliToken</a></li></ul><p>At <a href="https://dnx.solutions/"><em>DNX Solutions</em></a>, we work to bring a better cloud and application experience for digital-native companies in Australia.</p><p>Our current focus areas are AWS, Well-Architected Solutions, Containers, ECS, Kubernetes, Continuous Integration/Continuous Delivery, and Service Mesh and Data Solutions (movement, transformation, lakes, warehouses and analytics).</p><p>We are always hiring cloud engineers for our Sydney office, focusing on cloud-native concepts.</p><p><em>Check our open-source projects at</em> <a href="https://github.com/DNXLabs"><em>https://github.com/DNXLabs</em></a> <em>and follow us on</em> <a href="https://www.linkedin.com/company/dnx-solutions/"><em>Linkedin</em></a> or <a href="https://www.facebook.com/SolutionsDNX"><em>Facebook</em></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a773edfa0a45" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dnx-labs/how-to-use-apache-airflow-cli-with-amazon-mwaa-a773edfa0a45">How to use Apache Airflow CLI with Amazon MWAA</a> was originally published in <a href="https://medium.com/dnx-labs">DNX Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Migrating an on-premise Cpanel to AWS]]></title>
            <link>https://medium.com/dnx-labs/case-study-migrating-an-on-premise-cpanel-to-aws-d9309e839282?source=rss----bef899c96973---4</link>
            <guid isPermaLink="false">https://medium.com/p/d9309e839282</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[cpanel]]></category>
            <dc:creator><![CDATA[Jeremias Roma]]></dc:creator>
            <pubDate>Thu, 11 Feb 2021 23:56:01 GMT</pubDate>
            <atom:updated>2021-02-15T06:56:07.720Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ndMl_rw9k2fsCDgUZ-B3kA.png" /><figcaption>Photo by <a href="https://unsplash.com/@paulinel?utm_source=medium&amp;utm_medium=referral">Pauline Loroy</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>The challenge:</h3><p>If you don’t know Cpanel, think of it as an all-in-one open-source box. Cpanel is a powerful hosting server with built-in services such as Apache, PHP, Mysql, and Named for DNS. It allows you to create customised hosting packages and host customers over them. Usually, it’s well suited to small customers. The biggest challenge starts when you put more and more load within the same box.</p><p>What about a scenario where you don’t have a single hosting package although you have built your solution years ago over Cpanel APIs? These APIs are used to provision email accounts, FTP users, DNS records, and so on.</p><p>You would end up with an infrastructure design like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/0*89jIcli5R1wC1frv" /><figcaption>All-in Cpanel</figcaption></figure><p>Even though you have a big server to handle all the workloads, what happens if the server goes down? And if you have that server hosted in a third-party data center? You would have to raise a ticket and wait for their answer. Meaning a big downtime ahead.</p><h3>Solution:</h3><p>Since decoupling services and applications into micro-services is a complex and long process, the fastest solution was to lift and shift the server to a similar Cpanel server on an EC2 instance.</p><p>That choice gave time to the developer teamwork on the overwhelming applications while allowing some standard applications to be pushed to the Cloud.</p><p>Previously, all the PHP Laravel APIs running on that box were modernised to docker images and deployed on ECS.</p><p>Check it out our open-source terraform ECS cluster module:</p><p><a href="https://github.com/DNXLabs/terraform-aws-ecs">DNXLabs/terraform-aws-ecs</a></p><p>And our module to deploy ECS applications such as PHP Laravel:</p><p><a href="https://github.com/DNXLabs/terraform-aws-ecs-app">DNXLabs/terraform-aws-ecs-app</a></p><p>If you want to find out more about application modernisation for PHP, Node, Ruby, etc, check out our website:</p><p><a href="https://dnx.solutions/application-modernisation/">application modernisation - DNX Solutions</a></p><h3>Phase 1 - Decoupling the most overwhelming Cpanel services</h3><h4>DNS to Route 53:</h4><p>Dumping all Route 53 records from a Cpanel server is a pain in the neck. Why’s that? Because Cpanel usually creates a lot of ‘useless’ records if you’re creating a single domain or subdomain.</p><p>We managed to have all the DNS records and values and we’ve created all of them on Route 53.</p><p>There is no simple way to dump the DNS records on Cpanel. Be aware of that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*OrUPH6Uq6-sStDSuedfbFQ.jpeg" /><figcaption>It is always DNS</figcaption></figure><h4>Mysql to RDS:</h4><p>The databases on Cpanel are created with a strange prefix to avoid duplication. We’ve got a dump of all databases, and using the python script below, we ran a 40 or so parallel syncs to restore all databases:</p><p><a href="https://github.com/DNXLabs/tools-box/blob/master/scripts/parallel-script/parallel_db_restore.py">DNXLabs/tools-box</a></p><h3>Phase 1 final design:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/0*HV6bahurJvWSYH_w" /></figure><p>Now we have a server running on AWS and at least some ways to handle the forthcoming problems.</p><p>Right now, the solution is not yet finalised, so stay tuned for our next posts where we will update you with the next stages of this migration.</p><p>To Be Continued…</p><p>At <a href="https://dnx.solutions/"><em>DNX Solutions</em></a>, we work to bring a better cloud and application experience for digital-native companies in Australia.</p><p>Our current focus areas are AWS, Well-Architected Solutions, Containers, ECS, Kubernetes, Continuous Integration/Continuous Delivery, and Service Mesh and Data Solutions (movement, transformation, lakes, warehouses and analytics).</p><p>We are always hiring cloud engineers for our Sydney office, focusing on cloud-native concepts.</p><p><em>Check our open-source projects at</em> <a href="https://github.com/DNXLabs"><em>https://github.com/DNXLabs</em></a> <em>and follow us on</em> <a href="https://www.linkedin.com/company/dnx-solutions/"><em>Linkedin</em></a> or <a href="https://www.facebook.com/SolutionsDNX"><em>Facebook</em></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9309e839282" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dnx-labs/case-study-migrating-an-on-premise-cpanel-to-aws-d9309e839282">Migrating an on-premise Cpanel to AWS</a> was originally published in <a href="https://medium.com/dnx-labs">DNX Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mirroring Docker Hub with AWS Public ECR]]></title>
            <link>https://medium.com/dnx-labs/mirroring-docker-hub-with-aws-public-ecr-c2126f26feb7?source=rss----bef899c96973---4</link>
            <guid isPermaLink="false">https://medium.com/p/c2126f26feb7</guid>
            <dc:creator><![CDATA[Arthur Diniz]]></dc:creator>
            <pubDate>Thu, 14 Jan 2021 03:14:23 GMT</pubDate>
            <atom:updated>2021-01-14T03:14:23.663Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-62VqwOxuNaZj4V8" /><figcaption>Photo by <a href="https://unsplash.com/@kiwihug?utm_source=medium&amp;utm_medium=referral">Kiwihug</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>On December 1, 2020, Amazon announced <strong>ECR Public</strong> and <strong>ECR Public Gallery</strong>.</p><p>We at DNX Solutions are always looking to give support with the most updated AWS features to our clients, so we came up with the idea to create a mirror between Docker Hub and Amazon Public ECR.</p><p>The fastest way we found was creating a simple python script to automate the <strong>pull</strong> and <strong>push</strong> of a list of docker images declared. To make sure we were on the right path, we tested migrating all our images.</p><p>Running from an EC2 instance, this took around <strong>10</strong> hours, <strong>26</strong> repositories, <strong>188</strong> images, and more than <strong>39</strong> GB of data.</p><p>We are very passionate about the open-source culture and being mindful of the people who follow us, on the link below you can find the script with instructions on how to create the mirror.</p><p><a href="https://github.com/DNXLabs/tools-box/tree/master/scripts/dockerhub-ecr-migration">DNXLabs/tools-box</a></p><p>At <a href="https://dnx.solutions/"><em>DNX Solutions</em></a>, we work to bring a better cloud and application experience for digital-native companies in Australia.</p><p>Our current focus areas are AWS, Well-Architected Solutions, Containers, ECS, Kubernetes, Continuous Integration/Continuous Delivery, and Service Mesh and Data Solutions (movement, transformation, lakes, warehouses and analytics).</p><p>We are always hiring cloud engineers for our Sydney office, focusing on cloud-native concepts.</p><p><em>Check our open-source projects at</em> <a href="https://github.com/DNXLabs/"><em>github.com/DNXLabs</em></a> <em>and follow us on</em> <a href="https://www.linkedin.com/company/dnx-solutions/"><em>Linkedin</em></a> or <a href="https://www.facebook.com/SolutionsDNX"><em>Facebook</em></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2126f26feb7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dnx-labs/mirroring-docker-hub-with-aws-public-ecr-c2126f26feb7">Mirroring Docker Hub with AWS Public ECR</a> was originally published in <a href="https://medium.com/dnx-labs">DNX Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s talk about NodeJS Promises,  I promise it won't be long]]></title>
            <link>https://medium.com/dnx-labs/lets-talk-about-nodejs-promises-i-promise-it-wont-be-long-dcd145b1b544?source=rss----bef899c96973---4</link>
            <guid isPermaLink="false">https://medium.com/p/dcd145b1b544</guid>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[callback]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[promises]]></category>
            <dc:creator><![CDATA[Woltter Xavier]]></dc:creator>
            <pubDate>Thu, 03 Sep 2020 06:39:46 GMT</pubDate>
            <atom:updated>2020-09-03T06:39:46.268Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dIBplDh2FJ1-ookQuwL87g.png" /><figcaption><a href="https://flic.kr/p/dGLeY">Photo</a> by <a href="https://flickr.com/photos/chefranden/">Randen Pederson</a>, used under <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA 2.0</a>, cropped from original.</figcaption></figure><h3>Let’s talk about NodeJS Promises, I promise it won&#39;t be long</h3><p>Serverless architectures are becoming very popular nowadays and NodeJS runtime is an interesting option on AWS Lambda. However, an asynchronous runtime is not always a suitable solution. So, understanding promises in Javascript is essential to determine when to use NodeJS Lambda Functions on AWS.</p><p>In this article, we are going to wall through the characteristics of javascript in chronological order. As the title says, it won’t be long so bear with me!</p><p>:)</p><h3>First things first, non-blocking.</h3><p>It is a huge topic and can be considered a subject for another article. However is essential to keep in mind that NodeJS is a non-blocking language and uses a single Thread to run your operations.</p><p>What do you expect before running this snippet NodeJS code? Most people would expect something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/adbefddf5b26f1e9dadce0b31b164fc2/href">https://medium.com/media/adbefddf5b26f1e9dadce0b31b164fc2/href</a></iframe><pre>1.Starting up<br>2.Two seconds!<br>3.Zero seconds!<br>4.Finishing up</pre><p>But, remember that NodeJS is asynchronous by default so the result of this code is going to be this:</p><pre>1.Starting up<br>4.Finishing up<br>3.Zero seconds!<br>2.Two seconds!</pre><p>Please notice that everything happens at the same time, go ahead and execute this code in your terminal, start to play around. You will start to understand what happens under the hood or optionally you can stay tuned a new article about Single Thread in details is coming soon. 👍</p><h3>Callbacks are like promises’ ancestors</h3><p>So, we had Callbacks before that are the foundation of NodeJS, using it you have the feeling that things are happening in sequence.</p><blockquote>A callback is a function called at the completion of a given task, this prevents any blocking, and allows other code to be run in the meantime.</blockquote><p>To illustrate callbacks let’s use the following example creating “<em>doWorkCallback</em>” function. This function simply waits 2 seconds and return either an error message or an array, so you can run in your terminal and alternate the return to see both results displayed in your display.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ea2779c69217b5420aab34d247fa6480/href">https://medium.com/media/ea2779c69217b5420aab34d247fa6480/href</a></iframe><p>If you are not familiar with this ES6 syntax, using arrow functions. I also created this snippet with a simpler code with the same functions:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a3bf7d07d4857202f849fb2661e4d36c/href">https://medium.com/media/a3bf7d07d4857202f849fb2661e4d36c/href</a></iframe><p>Here we can clearly see that the “synchronous” feeling is generated by the callback that is the functions passed to our myFunction as an argument.</p><p>🤯</p><h3>Let’s go to the official definition of promise</h3><blockquote>The <strong>Promise</strong> object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.</blockquote><p>When you have an asynchronous runtime by default, fetching operations will eventually require you to know the result of an operation to determine the next events in your application or script. It is one example where using promise is a suitable approach, so let’s move forward and investigate its origins.</p><p>This need for knowing the result of an asynchronous operation is not new and has appeared since the beginning. They are designed to manage asynchronous code, like callbacks enhancement.</p><p>Here is an example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ab500043e453425186098967f17cd86c/href">https://medium.com/media/ab500043e453425186098967f17cd86c/href</a></iframe><p>Using the same example before, but now using promises we can see their 3 states that are pending, fulfilled and rejected. So, you can monitor and take actions in your application or script based on those states.</p><p>Don’t be shy, go ahead and run this code on your computer! :)</p><p>I said it would not be long, so I am stopping here but we could extend this subject to callback hell, promise chaining and async-await topics. But the aim of this text is to explain promise in its pure form. It is essential to know the problem that these technologies solves and consider these aspects when choosing your AWS Lambda runtime.</p><p>Stay tuned for more content!</p><p>At <a href="https://dnx.solutions/">DNX Solutions</a>, we work to bring a better cloud and application experience for digital-native startups in Australia.</p><p>Our current focus areas are AWS, Well-Architected Solutions, Containers, ECS, Kubernetes, Continuous Integration/Continuous Delivery and Service Mesh and Data Solutions (movement, transformation, lakes, warehouses and analytics).</p><p>We are constantly hiring cloud engineers for our Sydney office, focusing on cloud-native concepts.</p><p><em>Check our open-source projects at </em><a href="https://github.com/DNXLabs"><em>https://github.com/DNXLabs</em></a><em> and follow us on our </em><a href="https://www.linkedin.com/company/dnx-solutions/"><em>Linkedin</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcd145b1b544" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dnx-labs/lets-talk-about-nodejs-promises-i-promise-it-wont-be-long-dcd145b1b544">Let’s talk about NodeJS Promises,  I promise it won&#39;t be long</a> was originally published in <a href="https://medium.com/dnx-labs">DNX Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RDS secrets rotation and ECS update]]></title>
            <link>https://medium.com/dnx-labs/rds-secrets-rotation-and-ecs-update-2307689545c4?source=rss----bef899c96973---4</link>
            <guid isPermaLink="false">https://medium.com/p/2307689545c4</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[rds]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Woltter Xavier]]></dc:creator>
            <pubDate>Thu, 27 Aug 2020 07:10:56 GMT</pubDate>
            <atom:updated>2020-08-27T07:22:35.130Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aDT2Rl_IOm4-i1zm3iQa-Q.png" /></figure><p>As every solution comes from a challenge or problem. Engineers love to solve problems and problem-solving requires creativity and knowledge of the tools you have available to you, very similar to an artist that want to express their art with different materials and tools that they have. So, here is the challenge/requirement solved:</p><h3>Challenge</h3><p>Database secrets rotation can be a compliance requirement or simply to enhance the security of your environments. Rotate RDS passwords in AWS is facilitated using the Secrets Manager service. However, you may have a fully automated deployment in your infrastructure as ECS blue-green deployments and want to refresh secrets also in your application when a new secret is created.</p><p>So, it is a challenge that can be tackled using AWS Lambda functions and here is how you can do it in an efficient and secure way on AWS.</p><h3>Solution</h3><p>Every solution starts with an efficient and solid architecture, the language chosen was Python due to its synchronous nature and vast source of libraries as for example boto3, a very popular and well-maintained set of functions to interact with AWS services. Below you can check a High-Level Diagram of the solution with its sequential steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1DXTGSZ4797yfPgrp-l1zQ.png" /></figure><ol><li>The Secret Rotation Lambda function connects to the RDS using the current secret stored in SSM parameters store.</li><li>Generates a 32 characters random password including ascii_letters, digits and 4. punctuation (excluding “:/@“\’\“) as those are separators characters as required by PostgreSQL</li><li>If current secret successfully connects, then rotates the secret in the database</li><li>Test new secret before update application parameters</li><li>If success, then the lambda builds the database URL and RDS secret.</li><li>Then, finally restarts the application containers on ECS to refresh secret</li></ol><p><em>Disclaimer: Keep in mind that this solution has some downtime and can be triggered during long term basis outside of business hours for example. If you cannot afford any downtime at all, you can use your application to manage the database connection pool and grab the secrets from SSM or Secrets Manager instead of using environment variables into ECS containers.</em></p><p>So, let’s get our hands dirty and deep drive into our Lambda function!</p><h3>Let’s check some code ⌨️</h3><p>For start, let’s import our dependencies, this solution imports the <em>PyGreSQL</em> classic interface and <em>pgdb</em> compliant module for PygreSQL written by Ch. Zwerschke and D’Arcy J.M. Cain respectively. Also, it imports typical libraries for string manipulation, timing and logging, for example.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5c9c4cc4137f938b3bac69488f74499/href">https://medium.com/media/b5c9c4cc4137f938b3bac69488f74499/href</a></iframe><p>And then our lambda function handler, here you can associate the steps 1 to 6 described before. Due to the synchronous process required for this solution, we can clearly see step by step how the python script will execute safely the secret rotation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2506527ca02d06d591afd21dc99505ba/href">https://medium.com/media/2506527ca02d06d591afd21dc99505ba/href</a></iframe><p>The generate_secret function has some particulates, as PostgreSQL does not accept certain punctuations in the password, be aware when generating a new secret, here is how the current function works:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b3cc837f69de929d4206ce8d62dabcd8/href">https://medium.com/media/b3cc837f69de929d4206ce8d62dabcd8/href</a></iframe><p>As in this scenario, the ECS service leverages SSM parameters store to build the tasks, restarting the application containers is necessary.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/80ea8fff5c6e33e930b5e254c2a60fbf/href">https://medium.com/media/80ea8fff5c6e33e930b5e254c2a60fbf/href</a></iframe><p>Don’t forget to create a Cloudwatch trigger for your Lambda function and keep in mind that it is not a zero-downtime approach, chose the <em>cron expression</em> wisely.</p><h3>🧙</h3><h3>The End</h3><p>If you read until this point and want to implement this solution on your AWS environment, I do not want to take more of your time and let you know that you can refer to the Github repository below, feel free to contribute or fork it anytime!</p><p><a href="https://github.com/wvxavier/ecs_rds_secret_rotation/blob/master/functions/lambda_function.py">wvxavier/ecs_rds_secret_rotation</a></p><p>At <a href="https://dnx.solutions/">DNX Solutions</a> we bring a better cloud experience for digital-native companies in Australia.</p><p>Our current focus areas are AWS, Well-Architected Solutions, Containers, ECS, Kubernetes, Continuous Integration/Continuous Delivery, Service Mesh, Data Engineering &amp; Analytics, and Managed Services.</p><p><em>Check our open-source projects at </em><a href="https://github.com/DNXLabs"><em>https://github.com/DNXLabs</em></a><em> and follow us on </em><a href="https://www.linkedin.com/company/dnx-solutions/"><em>Linkedin</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2307689545c4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dnx-labs/rds-secrets-rotation-and-ecs-update-2307689545c4">RDS secrets rotation and ECS update</a> was originally published in <a href="https://medium.com/dnx-labs">DNX Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Credit balances on AWS services: EC2 and RDS]]></title>
            <link>https://medium.com/dnx-labs/understanding-credit-balances-on-aws-services-ec2-and-rds-2c1d4cfeb8e0?source=rss----bef899c96973---4</link>
            <guid isPermaLink="false">https://medium.com/p/2c1d4cfeb8e0</guid>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Allan Denot]]></dc:creator>
            <pubDate>Sun, 16 Aug 2020 05:57:32 GMT</pubDate>
            <atom:updated>2020-08-17T01:17:54.728Z</atom:updated>
            <content:encoded><![CDATA[<h3>Understanding CPU credit balances on AWS services: EC2 and RDS</h3><p>Since Amazon released the “t2” instance class for EC2, a problem I noticed that happens more frequently than it should is lack of an understanding of how the credit system works.</p><p>One of the most common issues is when an EC2 instance runs out of CPU credits and becomes throttled, causing an impact on users.</p><p>This article covers how to leverage cost savings of bursting services while keeping high-availability.</p><h3>EC2: t2 and t3 instances</h3><p>The family of t2 and t3 instances are around 30% cheaper than their equivalent in other instance type families.</p><p>To achieve such reduction, AWS introduced “burstable” CPU credits. These credits are consumed every time the CPU is used and is replenished at a fixed rate, depending on the instance type.</p><blockquote>As an example, if you create a t2.micro instance (very popular as it’s part of the free tier), wait until your credit balance is full and then start using 100% of CPU, it will run out of credits in 2 hours and 24 minutes. After that the instance will be limited to use only 10% of the CPU.</blockquote><p>But how to calculate that?</p><p>Each instance type has a rate of credits earned and a maximum value. As per July/2020, the values are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EV6DJymwVBbuLtJXTSS2jw.png" /><figcaption>Source: <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-credits-baseline-concepts.html#earning-CPU-credits">https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-credits-baseline-concepts.html#earning-CPU-credits</a></figcaption></figure><p>For t2.micro from our example. The max credits it holds is 144.</p><p><strong>A CPU credit provides for 100% utilization of a full CPU core for one minute.</strong></p><p>The t2.micro has 144 credits and 1 CPU core, which means 144 minutes of 100% CPU, or 2h24m.</p><h4>How about t3?</h4><p>T3 is a newer generation. Overall the instances gain more credits for the same or cheaper cost, so the only reason to continue using T2 would be because of the free tier or if your region/AZ doesn’t support this type.</p><h4>Unlimited</h4><p>To prevent throttling when credits run out, you can enable T2/T3 Unlimited.</p><p>With this feature enabled, instead of limiting your CPU to the baseline, AWS will charge you an extra to keep your credits flowing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uo5AaffGtd3StqMM015u6w.png" /></figure><p>Enabling this can be a lifesaver if your workload is known to not use all the credits balance very often. Otherwise, it’s cheaper to use another instance type.</p><p>Example: If your instance works on 100% CPU for a full month on a t2.large, you will pay:</p><ul><li>$85.26 for the instance + $72 for the extra CPU credits = $157.26</li></ul><p>Comparing to an m4.large, which has the same specs, you would pay:</p><ul><li>$91.25</li></ul><p>In summary, T2/T3 instances are only cheaper when the amount of CPU credits provided is enough for your workloads. If your workload needs to sustain a high CPU over a long period of time, using an M4 or C5 is more economical.</p><h3>RDS</h3><p>Similar to EC2, RDS also supports T2/T3 instances, but with a catch.</p><p>RDS does not give the option to enable/disable T2/T3 Unlimited, which as we saw before, gives insurance against long CPU spikes that might exhaust the credits.</p><p>Instead, for RDS T2 instances have this option <strong>off by default</strong> and T3 instances have it <strong>on by default</strong>.</p><h3>Conclusion</h3><p>T2/T3 instances are great in terms of cost-efficiency, but it comes with an operational cost.</p><p>Using this instance class requires more planning and monitoring to make sure the type of workload running there is adequate and that you will be alerted before credits run out.</p><p>As an example, one of our Terraform modules creates an alarm for low credit balance on RDS instances automatically if the instance type starts with a “db.t”:</p><p><a href="https://github.com/DNXLabs/terraform-aws-db-monitoring/blob/master/cloudwatch-alarms.tf#L56">DNXLabs/terraform-aws-db-monitoring</a></p><p>At <a href="https://dnx.solutions/">DNX Solutions</a> we bring a better cloud experience for digital-native startups in Australia.</p><p>Our current focus areas are AWS, Well-Architected Solutions, Containers, ECS, Kubernetes, Continuous Integration/Continuous Delivery, Service Mesh, and Data Architecture and Services.</p><p><em>Check our open-source projects at </em><a href="https://github.com/DNXLabs"><em>https://github.com/DNXLabs</em></a><em> and follow us on our </em><a href="https://twitter.com/DNXLabs"><em>Twitter</em></a><em> or </em><a href="https://www.linkedin.com/company/dnx-solutions/"><em>Linkedin</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c1d4cfeb8e0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dnx-labs/understanding-credit-balances-on-aws-services-ec2-and-rds-2c1d4cfeb8e0">Understanding Credit balances on AWS services: EC2 and RDS</a> was originally published in <a href="https://medium.com/dnx-labs">DNX Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DNX Tech Update: June-July]]></title>
            <link>https://medium.com/dnx-labs/dnx-tech-update-june-july-c54e4750bf5?source=rss----bef899c96973---4</link>
            <guid isPermaLink="false">https://medium.com/p/c54e4750bf5</guid>
            <category><![CDATA[dnx-solutions]]></category>
            <category><![CDATA[techupdates]]></category>
            <category><![CDATA[dnx-one-updates]]></category>
            <dc:creator><![CDATA[Allan Denot]]></dc:creator>
            <pubDate>Thu, 13 Aug 2020 10:05:56 GMT</pubDate>
            <atom:updated>2020-08-17T01:06:31.702Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sMBVF0yb8fFaP1aqrKejAQ.jpeg" /></figure><p>This is our second update. Check out our first update here:</p><p><a href="https://medium.com/dnx-labs/dnx-tech-update-april-may-5f3091b07d79">DNX Tech Update: April-May</a></p><p>As part of our routine, we invest heavily in improving our open source stack and making sure knowledge is captured in the form of code.</p><h3>DNX One</h3><p>Last month our main focuses were on <strong>compliance and data.</strong></p><h4>Compliance</h4><p><a href="https://github.com/DNXLabs/terraform-aws-security-baseline">terraform-aws-security-baseline</a> — This module setup alerts for common controls defined on the <a href="https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-cis-controls.html">CIS AWS Foundations Benchmark</a>.</p><p><a href="https://github.com/DNXLabs/terraform-aws-ecs">terraform-aws-ecs</a> — Our ECS Cluster module now supports Fargate. Why is this included as a compliance update, you ask?</p><p>By being a managed service from AWS that is compliant with most industry regulations, Fargates reduces the burden for customers of having to manage compliance internally. More info at <a href="https://aws.amazon.com/fargate/faqs/#Security_and_Compliance">https://aws.amazon.com/fargate/faqs/#Security_and_Compliance</a>.</p><h4>Backups</h4><p><a href="https://github.com/DNXLabs/terraform-aws-backup">terraform-aws-backup</a> — A module to automatically backup data from multiple resources using Tags and AWS Backup.</p><h4>Logging</h4><p>We created are releasing a module that helps to ship logs to an ElasticSearch cluster: <a href="https://github.com/DNXLabs/terraform-aws-kinesis-stream-es">terraform-aws-kinesis-stream-es</a>.</p><p>It works by creating a subscription filter in Cloudwatch Logs which collects and puts these logs in a Kinesis Data Firehose stream. The Kinesis stream then will process and deliver to an ElasticSearch domain.</p><p>Kinesis was added to the mixture to act as a buffer between the logs collected and ElasticSearch, so in case of a spike above the capacity of ES or if it goes down for maintenance, logs entries are not lost.</p><h3>Blog</h3><p>Three new blog posts this months from our engineers:</p><ul><li><a href="https://medium.com/dnx-labs/aws-ecr-improving-container-security-by-using-docker-image-scanning-3e8a4c10453b">AWS ECR — Improving container security by using Docker image scanning</a></li><li><a href="https://medium.com/dnx-labs/upgrade-elasticsearch-from-2-3-to-7-4-71a95aac77b7">Upgrade Elasticsearch from 2.3 to 7.4</a></li><li><a href="https://medium.com/dnx-labs/aws-amplify-create-custom-resolvers-programmatically-to-fetch-data-from-aws-rds-databases-8ee304503051">AWS Amplify: Create Custom Resolvers Programmatically (to fetch data from AWS RDS databases)</a></li></ul><p>For the full blog, check <a href="https://medium.com/dnx-labs">https://medium.com/dnx-labs</a>.</p><h3>Under development</h3><h4>one-cli</h4><p>We are still working on improving the developer experience with AWS. Our CLI is one of the pillars of this strategy.</p><p>You can track the progress at <a href="https://github.com/DNXLabs/one-cli">https://github.com/DNXLabs/one-cli</a></p><p>For a snapshot of all our open-source code can be found at <a href="https://modules.dnx.one/">https://modules.dnx.one/</a></p><p>At <a href="https://dnx.solutions/">DNX Solutions</a> we bring a better cloud and application experience for digital-native startups in Australia.</p><p>Our current focus areas are AWS, Well-Architected Solutions, Containers, ECS, Kubernetes, Continuous Integration/Continuous Delivery, Service Mesh, and Data Architecture and Services.</p><p>We are continually hiring cloud engineers for our Sydney office, focusing on cloud-native concepts.</p><p><em>Check our open-source projects at </em><a href="https://github.com/DNXLabs"><em>https://github.com/DNXLabs</em></a><em> and follow us on our </em><a href="https://twitter.com/DNXLabs"><em>Twitter</em></a><em> or </em><a href="https://www.linkedin.com/company/dnx-solutions/"><em>Linkedin</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c54e4750bf5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dnx-labs/dnx-tech-update-june-july-c54e4750bf5">DNX Tech Update: June-July</a> was originally published in <a href="https://medium.com/dnx-labs">DNX Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An unexpected journey from SAP consultant to AWS cloud architect]]></title>
            <link>https://medium.com/dnx-labs/an-unexpected-journey-from-sap-consultant-to-aws-cloud-architect-a407a4402a2c?source=rss----bef899c96973---4</link>
            <guid isPermaLink="false">https://medium.com/p/a407a4402a2c</guid>
            <category><![CDATA[sap]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[career-advice]]></category>
            <dc:creator><![CDATA[Felipe de Mello Rodrigues]]></dc:creator>
            <pubDate>Tue, 14 Jul 2020 05:58:45 GMT</pubDate>
            <atom:updated>2020-07-15T01:30:29.770Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ObAvqi2V-wFpjy9o1NOcUw.png" /><figcaption>Photo by <a href="https://unsplash.com/photos/8QgQnUhYs7w"><strong>Ivan Aleksic</strong></a> on <a href="https://unsplash.com/">Unsplash</a></figcaption></figure><p>It has been three months since I decided to completely reshape my career moving from an SAP senior consultant role to an <a href="https://aws.amazon.com/certification/certified-solutions-architect-associate/">AWS cloud solutions architect </a>role. I knew this was an unconventional move, and several risks were involved in the process, but it has been a marvellous experience so far, and today I can talk with confidence this was the right choice for me.</p><p>A lot of my colleagues reacted in different ways when I announced this update, and I believe most of them still don’t get the point of transferring almost 12 years of solid experience in a particular field and restarting fresh in a completely new environment.</p><p>The idea behind this personal insight that I am sharing today is to bring enlightenment to some of the factors involved in this decision and also to advise other people that are facing a similar dilemma.</p><h3>Discovering the Cloud</h3><p>My first contact with Cloud was through SCP (SAP Cloud Platform) back in 2017, SCP was released in the market in 2012, but it was still a very young solution compared to the major players (AWS, GCP and Azure).</p><p>As soon SAP started to establish partnerships with the major cloud providers to deploy their PaaS on their data centres my curiosity increased and consequently I, slowly, moved my focus towards their environments, services and offers.</p><p>Finally, in between 2018 and 2019, I had the opportunity to work in a significant S/4HANA implementation deployed on AWS. Initially, I didn’t have too much exposure to the AWS cloud since I was more focused on development, data and reporting, the only advantage I could see at that point in time was the migration workload that is usually related with the SAP Basis team.</p><p>The turnover happened when this customer decided to transfer their reporting strategy from SAP proprietary solution to AWS data lake approach. Testifying this customer’s decision gave me a clear view of the potential while combining the best of both worlds, and my curiosity continuously grew over time.</p><p>As an SAP consultant participating in this migration project, I remember how confusing communications were between both teams and during the process, I realised how important it was to have an architect with experience in both ends.</p><p>At that particular moment, my unexpected journey began.</p><h3>Moving to the Cloud</h3><p>Changing to a new career path is not an easy task, especially if you are in your comfort zone for more than a decade. So, at that point, I was questioning myself, how should I start this journey?</p><p>The first thing I did was to enter in contact with my network. I scheduled several catch-ups around the city with some of the most talented colleagues in my connections list.</p><p>Based on their inputs, I noticed it was necessary to focus on two main items:</p><ul><li>Select a cloud provider only, don’t try to cover all of them at the same time. My choice was AWS because of market share in Australia and the list of services available.</li><li>Study and prepare yourself for the associate level certifications, having a cloud certification is an excellent entry-point for the market and also provides the knowledge base to start as a consultant in the area.</li></ul><p>I started this certification path focused on AWS, and in three months, I got precisely three AWS certifications:</p><ol><li>AWS Certified Cloud Practitioner</li><li>AWS Certified Solutions Architect — Associate</li><li>AWS Certified Developer — Associate</li></ol><p>With the exposure of the certifications in my online profile, I received an invite to participate in an internal program of a well known AWS consultancy in Sydney. They offered me a mentorship/training program, I was learning even more during this process, and in parallel, I was able to demonstrate my value as a consultant during each phase of the training.</p><p>At the end of this program, I received an invitation to join the company, and the rest is history, three months of exciting work with incredible customers, lots of learnings and many plans for the future.</p><h3>Adapting my SAP experience to the Cloud</h3><p>So, what about all the experience I had in the SAP space? Is it all gone?</p><p>I’m not programming in ABAP or using SAP-related technologies anymore. Still, several skills that I constructed during this journey were adapted quickly to the Cloud Architect role and provided me advantages compared to other consultants, for example:</p><ul><li>Soft-skills</li><li>Customer-facing skills</li><li>Enterprise architecture experience</li><li>Business processes and communication</li></ul><p>Also, the experience as <em>Software engineer </em>and as <em>Data analyst / BI consultant</em> that I acquired while working with SAP contributed a lot to the transition process providing me enough know-how to design solutions for applications or data strategies in the Cloud.</p><p>Finally, notice that SAP creates their own technologies in house, but they are usually looking for external references in the market, consequently, since I had a vast background in multiple technologies I was able to grasp new content in a faster way.</p><h3>The future of SAP and AWS</h3><p>From my point of view, there are three major areas to explore when talking about SAP and AWS:</p><ol><li><strong>Migration workload</strong>: This is one of the most consolidated areas when talking about SAP and AWS. A lot of customers are already running their workloads in AWS and taking advantage of the cloud proposition. A few companies are specialising in this kind of activity, and this market continues growing over time.</li><li><strong>Application extensibility</strong>: With SAP releasing their software in a SaaS model, the application extensibility was reshaped, and side-by-side extensibility became an important topic. Different initiatives are running via SAP Cloud Platform with Cloud-foundry for S/4HANA and also with Kyma and Kubernetes for C/4HANA, but in case the SAP PaaS is not the preferable option of the customer, the application extensibility can be done directly in the cloud provider of choice, using their own offerings of PaaS, with custom integrations between the apps and core solutions (e.g. S/4HANA or C/4HANA).</li><li><strong>Data and reporting strategy</strong>: Actually, this is one of those areas that I share most of my interest and excitement. Data and reporting strategies outside of the SAP in-house software offerings are becoming more and more common. Since there aren’t any impacts with read-only data in the SAP indirect licensing model, a lot of customers are exploring alternative solutions moving their data and reporting strategies to data lakes and analysing and visualising their insights through different cloud services.</li></ol><h3>Finally, what about my future?</h3><p>At the moment, I don’t see a return to the SAP world in the short or long term. However, this doesn’t mean that I abandoned the area for good.</p><p>As I mentioned before, I believe there is a lot of potential to combine both worlds and create incredible solutions for the customers, but at this stage, I am fully committed with my cloud journey, and I have a lot of plans in progress.</p><p>I hope this blog gave you some ideas of how to start if you are facing a similar transition and I also wish I was able to bring you some kind of motivation to leave your comfort zone and try something new.</p><p>If you are interested in some of my previous SAP content, I advise you to have a look in my <em>SAP People profile.</em> I have some exciting blogs focused on different technologies that will give you an overview of the kind of work I was doing before this new role.</p><p>SAP People: <a href="https://people.sap.com/felipedemello.rodrigues">https://people.sap.com/felipedemello.rodrigues</a></p><p>If you are interested in Data and AWS or more content combining SAP and AWS, stay tuned because I have more insights to share along the way. :)</p><p>At <a href="https://dnx.solutions/">DNX Solutions</a> we bring a better cloud and application experience for digital-native startups in Australia.</p><p>Our current focus areas are AWS, Well-Architected Solutions, Containers, ECS, Kubernetes, Continuous Integration/Continuous Delivery, Service Mesh, and Data Architecture and Services.</p><p>We are continually hiring cloud engineers for our Sydney office, focusing on cloud-native concepts.</p><p><em>Check our open-source projects at </em><a href="https://github.com/DNXLabs"><em>https://github.com/DNXLabs</em></a><em> and follow us on our </em><a href="https://twitter.com/DNXLabs"><em>Twitter</em></a><em> or </em><a href="https://www.linkedin.com/company/dnx-solutions/"><em>Linkedin</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a407a4402a2c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dnx-labs/an-unexpected-journey-from-sap-consultant-to-aws-cloud-architect-a407a4402a2c">An unexpected journey from SAP consultant to AWS cloud architect</a> was originally published in <a href="https://medium.com/dnx-labs">DNX Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS Amplify: Create Custom Resolvers Programmatically (to fetch data from AWS RDS databases)]]></title>
            <link>https://medium.com/dnx-labs/aws-amplify-create-custom-resolvers-programmatically-to-fetch-data-from-aws-rds-databases-8ee304503051?source=rss----bef899c96973---4</link>
            <guid isPermaLink="false">https://medium.com/p/8ee304503051</guid>
            <category><![CDATA[dnx]]></category>
            <category><![CDATA[amplify]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Antonio Figueiredo Tamura]]></dc:creator>
            <pubDate>Tue, 30 Jun 2020 05:52:13 GMT</pubDate>
            <atom:updated>2020-07-03T01:16:58.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W7CswTG6r2oBCo7AcBAX0w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@toddquackenbush">Todd Quackenbush</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>AWS Amplify is an amazing open-source project from AWS that helps you build secure, scalable mobile and web applications.</p><p>In this post, I will help you to create custom resolvers programmatically in AWS Amplify without relying on the AWS Console and keeping everything as code that in the past, you either needed to use the AWS AppSync console or edit AWS CloudFormation templates to implement this logic.</p><h3><strong>Why Custom Resolvers?</strong></h3><blockquote>If you’re not familiar with <a href="https://aws.amazon.com/appsync/">AWS AppSync</a> or GraphQL, a “resolver” is essentially a function that’s responsible for fetching data from a location to fulfil a request. For instance, a resolver might query from a database to get a stored record, or it could just compute a value directly. Resolvers are attached to fields on a “type” in a GraphQL schema. These are executed at runtime, depending on the request that comes from a client.<br>When you’re developing GraphQL APIs, you often have to customize the resolvers to perform custom logic and implement things like data manipulation, authorisation, or fine-grained access control.</blockquote><blockquote><em>Reference: </em><a href="https://aws.amazon.com/blogs/mobile/amplify-adds-support-for-multiple-environments-custom-resolvers-larger-data-models-and-iam-roles-including-mfa/"><em>https://aws.amazon.com/blogs/mobile/amplify-adds-support-for-multiple-environments-custom-resolvers-larger-data-models-and-iam-roles-including-mfa/</em></a></blockquote><p>In our example here, We want to fetch the data from an AWS RDS PostgreSQL database instead of a Dynamo DB table.</p><h3><strong>Before you start!</strong></h3><p>You must have your Amplify project initialised (<strong><em>amplify init</em></strong>), and create a GraphQL API (<strong><em>amplify API add</em></strong>), I won’t focus in this initialising part. If you are here, you should have done this as well. Now We Can start modifying the default code created by Amplify.</p><h3><strong>Starting to code</strong></h3><p>It is our example schema:</p><p>schema.graphql example</p><p>We should create our lambda that will be our Custom Resolver:<br>Run the command:<strong> amplify add function<br></strong>We will call it <strong>lambdaResolver</strong>, as the output bellow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*sPyEEcxaQAKX9n1hBh7VQQ.png" /><figcaption>Creating the function/lambda lambdaResolver using Amplify CLI</figcaption></figure><p>Now we can start editing our <strong>Lambda Resolver</strong>:</p><p>index.js for lambdaResolver</p><p>This Custom Resolver will be responsible for fetching the data that you want, and you can get the data from any source. You need to return the exact object that your schema is expecting, for example, to mock some data you can do the following:</p><p>index.js for lambdaResolver mocking data</p><p>Make sure that you lambda has the right permission/access and/or It’s in the correct VPC and has the necessary execution role. In our case, We are fetching the data from an AWS RDS PostgreSQL located in a secure subnet. The <strong>lambda resolver</strong> should be able to reach the RDS.</p><h3><strong>VLT Templates</strong></h3><p>For each method, you should create a VLT template inside the <strong><em>resolvers </em></strong>folder for the response and the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*UW0ybhRIQ__1r5ByQplw4w.png" /><figcaption>location of the VLT templates</figcaption></figure><p><a href="https://gist.github.com/antonioftamura/f4f4791e998ed139012aedc799d62123#file-query-gettodo-req-vtl">Query.getTodo.req.vtl</a></p><p><a href="https://gist.github.com/antonioftamura/2ca8d22b5567c18a6e4c5e6bc88d54f4#file-query-gettodo-res-vtl">Query.getTodo.res.vtl</a></p><h3><strong>Custom Resources (DataSource and Resolver)</strong></h3><p>We need to create custom resources for our <strong>lambda resolver, </strong>and<strong> We</strong> will add a <strong>DataSource, Resolver </strong>and a <strong>Role.<br></strong>The <strong>DataSource</strong> will be our <strong>lambda resolver. Resolver </strong>will map our <strong>VTL templates</strong> and the method. The <strong>Role </strong>will permit the <strong>DataSource</strong> to execute the lambda.</p><p>CustomResources.json responsible for creating the DataSource, Resolver and Lambda Role</p><p>These resources should be included inside the <strong>CustomResources.json</strong> file inside the <strong>stacks </strong>folder.</p><p>After all the change We should push/sync our project. You can push your changes to your code repository if you are using the Amplify pipelines, or call the CLI command <strong>amplify push</strong> to run locally.</p><p>It will create all resources that We included in <strong>CustomResources.json </strong>file and will link each other. We can open the AppSync console (<strong>amplify API console</strong>), and We can see all the code that We added are there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T80QB-2Ny8_a461zCuF6dQ.png" /><figcaption>DataSource with our Lambda Resolver</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FNCGl4hGNc0sZXP4FFwOYQ.png" /><figcaption>getTodo method pointing to the Lambda Resolver Function</figcaption></figure><p>Now We can test our Query if it’s working and calling our lambda.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XHHsTq_NRKwSOWq1ix5E-Q.png" /><figcaption>Querying the getTodo method</figcaption></figure><h3><strong>Conclusion</strong></h3><p>You can programmatically create all your custom resolvers, without relying on the AWS Console. Also, you can connect to any data source you want, making it a powerful tool, even connect more data sources using Pipeline Resolvers.</p><p>We work at <a href="https://dnx.solutions/">DNX Solutions</a> and help to bring a better cloud and application experience for digital-native startups in Australia.</p><p>Our current focus areas are AWS, Well-Architected Solutions, Containers, ECS, Kubernetes, Continuous Integration/Continuous Delivery and Service Mesh.</p><p>We are continually hiring cloud engineers for our Sydney office, focusing on cloud-native concepts.</p><p><em>Check our open-source projects at </em><a href="https://github.com/DNXLabs"><em>https://github.com/DNXLabs</em></a><em> and follow us on our </em><a href="https://twitter.com/DNXLabs"><em>Twitter</em></a><em> or </em><a href="https://www.linkedin.com/company/dnx-solutions/"><em>Linkedin</em></a><em>.</em></p><blockquote>References:<br><a href="https://aws.amazon.com/amplify/?nc1=h_ls">https://aws.amazon.com/amplify/</a><br><a href="https://aws.amazon.com/blogs/mobile/amplify-adds-support-for-multiple-environments-custom-resolvers-larger-data-models-and-iam-roles-including-mfa/"><em>https://aws.amazon.com/blogs/mobile/amplify-adds-support-for-multiple-environments-custom-resolvers-larger-data-models-and-iam-roles-including-mfa/</em></a><em><br></em><a href="https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-lambda-resolvers.html#create-a-lam-function">https://docs.aws.amazon.com/appsync/latest/devguide/tutorial-lambda-resolvers.html#create-a-lam-function</a><br><a href="https://docs.aws.amazon.com/appsync/latest/devguide/test-debug-resolvers.html">https://docs.aws.amazon.com/appsync/latest/devguide/test-debug-resolvers.html</a><br><a href="https://docs.amplify.aws/cli/graphql-transformer/resolvers#add-a-custom-resolver-that-targets-a-dynamodb-table-from-model">https://docs.amplify.aws/cli/graphql-transformer/resolvers#add-a-custom-resolver-that-targets-a-dynamodb-table-from-model</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ee304503051" width="1" height="1" alt=""><hr><p><a href="https://medium.com/dnx-labs/aws-amplify-create-custom-resolvers-programmatically-to-fetch-data-from-aws-rds-databases-8ee304503051">AWS Amplify: Create Custom Resolvers Programmatically (to fetch data from AWS RDS databases)</a> was originally published in <a href="https://medium.com/dnx-labs">DNX Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>