<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>DevOps on Mysterious Code - Senior AWS, DevOps &amp; security engineering</title><link>https://mysteriouscode.com/blog/category/devops/</link><description>Recent content in DevOps on Mysterious Code - Senior AWS, DevOps &amp; security engineering</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Sun, 28 Jun 2026 09:00:00 +0000</lastBuildDate><atom:link href="https://mysteriouscode.com/blog/category/devops/index.xml" rel="self" type="application/rss+xml"/><item><title>How to validate a CloudFormation template (CLI and cfn-lint)</title><link>https://mysteriouscode.com/blog/how-to-validate-cloudformation-template-with-aws-cli/</link><pubDate>Sun, 28 Jun 2026 09:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/how-to-validate-cloudformation-template-with-aws-cli/</guid><description>&lt;p&gt;Validating an IaC template before you hand it to CloudFormation is one of the cheapest ways to avoid the
dreaded &lt;code&gt;UPDATE_ROLLBACK_IN_PROGRESS&lt;/code&gt;. You can catch a lot without ever creating a stack - but only if you understand
what the tool you use actually checks. Here are the two we usually use, and where one stops and the other takes over.&lt;/p&gt;</description></item><item><title>Multiplatform docker images for cfn-lint (and a v1.52 schema fix)</title><link>https://mysteriouscode.com/blog/multiplatform-docker-images-for-cfn-lint-and-a-v1.52-schema-fix/</link><pubDate>Sat, 27 Jun 2026 09:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/multiplatform-docker-images-for-cfn-lint-and-a-v1.52-schema-fix/</guid><description>&lt;p&gt;A while back we wrote about our &lt;a href="https://mysteriouscode.com/blog/automatically-updated-docker-image-for-cfn-lint/"&gt;automatically updated docker image for cfn-lint&lt;/a&gt; -
a public, daily-rebuilt image for &lt;a href="https://github.com/aws-cloudformation/cfn-lint"&gt;cfn-lint&lt;/a&gt; that fills the gap left by
the lack of an official one. Two changes have just landed in that build, and both are worth a few words: the images are
now multiplatform, and we have fixed a problem that, from cfn-lint v1.52.0 onwards, left the image unable to recognise
any resources.&lt;/p&gt;</description></item><item><title>Automatically updated docker image for cfn-lint</title><link>https://mysteriouscode.com/blog/automatically-updated-docker-image-for-cfn-lint/</link><pubDate>Thu, 18 Apr 2024 15:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/automatically-updated-docker-image-for-cfn-lint/</guid><description>&lt;p&gt;If you&amp;rsquo;re using CloudFormation, you probably know about &lt;a href="https://github.com/aws-cloudformation/cfn-lint"&gt;cfn-lint&lt;/a&gt; - a
linting tool created by the CloudFormation team to validate templates against the schema and best practices. Validating
each template before deployment is in itself actually
&lt;a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.html#validate"&gt;considered a best practice by AWS&lt;/a&gt;.
However, simply using &lt;code&gt;validate-template&lt;/code&gt; in the Console or CLI
&lt;a href="https://mysteriouscode.com/blog/how-to-validate-cloudformation-template-with-aws-cli/"&gt;only validates the basic syntax of the template&lt;/a&gt;,
not the actual contents and resource specification. That&amp;rsquo;s where using a linter like &lt;a href="https://github.com/aws-cloudformation/cfn-lint"&gt;cfn-lint&lt;/a&gt;
can be helpful to make sure you&amp;rsquo;re not making any obvious mistakes or going against best practices in your resources.&lt;/p&gt;
&lt;p&gt;You can use &lt;code&gt;cfn-lint&lt;/code&gt; in a number of ways during development, including simply within command-line, using git pre-commit
hooks or as a plugin to your IDE. All those options, while helpful in day-to-day work, do not establish code quality
standards for your overall codebase. To do that, it&amp;rsquo;s ideal to include linting as part of CI/CD pipeline and/or
pull/merge-requests approval process.&lt;/p&gt;
&lt;p&gt;That is where you can come across a hurdle: &lt;a href="https://github.com/aws-cloudformation/cfn-lint/issues/1025"&gt;cfn-lint does not have an official, up-to-date docker image&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Complete code: automated EC2 snapshots and retention management</title><link>https://mysteriouscode.com/blog/complete-code-automated-ec2-snapshots-and-retention-management/</link><pubDate>Sun, 11 Mar 2018 23:22:07 +0000</pubDate><guid>https://mysteriouscode.com/blog/complete-code-automated-ec2-snapshots-and-retention-management/</guid><description>&lt;p&gt;Creating snapshots from EBS drives attached to your EC2 instances is the most basic way of backing up your data. While
you have to be cautious when snapshotting running EC2 instances without restart, doing it regularly is a base of many
disaster recovery plans. In the latest update
to &lt;a href="https://github.com/pbudzon/aws-maintenance"&gt;aws-maintenance repo on GitHub&lt;/a&gt; you&amp;rsquo;ll find a complete code and
CloudFormation template that will make this as painless a process as possible.&lt;/p&gt;</description></item><item><title>Complete code: cross-region RDS recovery</title><link>https://mysteriouscode.com/blog/complete-code-cross-region-rds-recovery/</link><pubDate>Thu, 28 Dec 2017 00:12:46 +0000</pubDate><guid>https://mysteriouscode.com/blog/complete-code-cross-region-rds-recovery/</guid><description>&lt;p&gt;After posting the previous post on this
topic (&lt;a href="https://mysteriouscode.com/blog/copying-rds-snapshot-to-another-region-for-cross-region-recovery/"&gt;Copying RDS snapshot to another region for cross-region recovery&lt;/a&gt;)
, I noticed a lot of people being interested in using the code I provided as an example. Many were not sure how to make
use of it, and
after &lt;a href="https://github.com/pbudzon/aws-maintenance/pulls?utf8=%E2%9C%93&amp;amp;q=is%3Apr"&gt;a couple of pull requests&lt;/a&gt; it became
obvious that a complete, fully-working code and CloudFormation template would be a good idea. So, yesterday, I pushed an
update to &lt;a href="https://github.com/pbudzon/aws-maintenance/"&gt;aws-maintenance&lt;/a&gt; repository with a fully working code, which you
can easily customize via CloudFormation parameters to match your needs.&lt;/p&gt;</description></item><item><title>Packer, Ansible, CentOS and requiretty</title><link>https://mysteriouscode.com/blog/packer-ansible-centos-and-requiretty/</link><pubDate>Fri, 11 Nov 2016 10:00:42 +0000</pubDate><guid>https://mysteriouscode.com/blog/packer-ansible-centos-and-requiretty/</guid><description>&lt;p&gt;If you&amp;rsquo;ve tried running Packer with CentOS on AWS, you probably noticed this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; sudo: sorry, you must have a tty to run sudo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>How to deploy Wordpress in AWS</title><link>https://mysteriouscode.com/blog/how-to-deploy-wordpress-in-aws/</link><pubDate>Fri, 04 Nov 2016 10:00:02 +0000</pubDate><guid>https://mysteriouscode.com/blog/how-to-deploy-wordpress-in-aws/</guid><description>&lt;p&gt;I&amp;rsquo;m not talking about launching an EC2 instance, uploading the zip with WordPress and going through the installer. I&amp;rsquo;m
talking about immutable infrastructure, scalable, self-healing setup of WordPress within AWS.&lt;/p&gt;</description></item><item><title>How I passed Red Hat Certificate of Expertise in Ansible Automation exam (EX407)</title><link>https://mysteriouscode.com/blog/how-i-passed-red-hat-certificate-of-expertise-in-ansible-automation-exam-ex407/</link><pubDate>Fri, 14 Oct 2016 10:00:38 +0000</pubDate><guid>https://mysteriouscode.com/blog/how-i-passed-red-hat-certificate-of-expertise-in-ansible-automation-exam-ex407/</guid><description>&lt;p&gt;I have recently passed Red Hat&amp;rsquo;s EX407 (Red Hat Certificate of Expertise in Ansible Automation exam) and I wanted to
share my experience for anyone else who might be looking into getting that certificate. At the time of my exam, I was
only a second (publicly visible) person in the UK who had that certificate. Probably because it was only made available
in summer this year.&lt;/p&gt;
&lt;p&gt;

&lt;img src="https://mysteriouscode.com/images/blog/2016/10/redhat-ansible-search_hu_bf7b3c5866b4a05f.png" srcset="https://mysteriouscode.com/images/blog/2016/10/redhat-ansible-search_hu_fe90667755bd524e.webp 320w, https://mysteriouscode.com/images/blog/2016/10/redhat-ansible-search_hu_a2952b48a3c06ace.webp 600w" sizes="(max-width: 800px) 100vw, 800px" alt="redhat certification search results" loading="lazy"&gt;
&lt;/p&gt;</description></item><item><title>Deployment pipeline, part 3: deployment onto an environment</title><link>https://mysteriouscode.com/blog/deployment-pipeline-part-3-deployment-onto-an-environment/</link><pubDate>Fri, 07 Oct 2016 10:00:01 +0000</pubDate><guid>https://mysteriouscode.com/blog/deployment-pipeline-part-3-deployment-onto-an-environment/</guid><description>&lt;p&gt;The purpose of every deployment pipeline is&amp;hellip; a deployment. So this final part of the series, will focus on just that.
If you missed the
intro, &lt;a href="https://mysteriouscode.com/blog/typical-ci-deployment-pipeline-overview/"&gt;check out the video where I describe a typical pipeline here&lt;/a&gt;.
The other parts of this series are &lt;a href="https://mysteriouscode.com/blog/deployment-pipeline-part-1-test-phase/"&gt;part 1: test phase&lt;/a&gt;
and &lt;a href="https://mysteriouscode.com/blog/deployment-pipeline-part-2-build-phase/"&gt;part 2: build phase&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;

&lt;img src="https://mysteriouscode.com/images/blog/2016/10/pipeline-part-3_hu_7b9b6719f4a3f4d1.png" srcset="https://mysteriouscode.com/images/blog/2016/10/pipeline-part-3_hu_b13c94fd8d53f0b9.webp 320w, https://mysteriouscode.com/images/blog/2016/10/pipeline-part-3_hu_873dbe1b6b72d86.webp 640w, https://mysteriouscode.com/images/blog/2016/10/pipeline-part-3_hu_456e34f418b1081.webp 960w, https://mysteriouscode.com/images/blog/2016/10/pipeline-part-3_hu_b9f4a77ee51c1eb1.webp 969w" sizes="(max-width: 800px) 100vw, 800px" alt="pipeline-part-3" loading="lazy"&gt;
&lt;/p&gt;
&lt;p&gt;Once we create an AMI that we&amp;rsquo;d like to deploy, performing a rolling update on existing instances is fairly easy. Usage
of Auto scaling groups and CloudFormation makes it even easier - &lt;a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html"&gt;since AWS Auto scaling groups support the rolling updates&lt;/a&gt;
out of the box.&lt;/p&gt;
&lt;p&gt;Or, if your applications requires blue-green deployments, using CloudFormation is almost essential.&lt;/p&gt;</description></item><item><title>Deployment pipeline, part 2: build phase</title><link>https://mysteriouscode.com/blog/deployment-pipeline-part-2-build-phase/</link><pubDate>Mon, 03 Oct 2016 09:00:58 +0000</pubDate><guid>https://mysteriouscode.com/blog/deployment-pipeline-part-2-build-phase/</guid><description>&lt;p&gt;Welcome to the second part of my series on deployment pipelines. If you missed the
intro, &lt;a href="https://mysteriouscode.com/blog/typical-ci-deployment-pipeline-overview/"&gt;check out the video where I describe a typical pipeline here&lt;/a&gt;.
The other parts of this series are &lt;a href="https://mysteriouscode.com/blog/deployment-pipeline-part-1-test-phase/"&gt;part 1: test phase&lt;/a&gt;
and &lt;a href="https://mysteriouscode.com/blog/deployment-pipeline-part-3-deployment-onto-an-environment/"&gt;part 3: deployment onto an environment&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;

&lt;img src="https://mysteriouscode.com/images/blog/2016/10/pipeline-part-2_hu_db446001d7363445.png" srcset="https://mysteriouscode.com/images/blog/2016/10/pipeline-part-2_hu_aacdc607f3689075.webp 279w" sizes="(max-width: 800px) 100vw, 800px" alt="pipeline-part-2" loading="lazy"&gt;
&lt;/p&gt;
&lt;p&gt;After the test phase of the pipeline, once the quality of the code has been checked, we must build a deployable artefact
for this version (commit) of the code. In case of AWS, this would be an
AMI (&lt;a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html"&gt;Amazon Machine Image&lt;/a&gt;), which can then be deployed
as a new instance in our environment.&lt;/p&gt;</description></item><item><title>Deployment pipeline, part 1: test phase</title><link>https://mysteriouscode.com/blog/deployment-pipeline-part-1-test-phase/</link><pubDate>Fri, 30 Sep 2016 10:00:10 +0000</pubDate><guid>https://mysteriouscode.com/blog/deployment-pipeline-part-1-test-phase/</guid><description>&lt;p&gt;Welcome to the first part of my series on deployment pipelines. If you missed the
intro, &lt;a href="https://mysteriouscode.com/blog/typical-ci-deployment-pipeline-overview/"&gt;check out the video where I describe a typical pipeline here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;

&lt;img src="https://mysteriouscode.com/images/blog/2016/09/pipeline-part-1_hu_1db87839cac00b39.png" srcset="https://mysteriouscode.com/images/blog/2016/09/pipeline-part-1_hu_6e8c42a9b6cfbec3.webp 276w" sizes="(max-width: 800px) 100vw, 800px" alt="pipeline-part-1" loading="lazy"&gt;
&lt;/p&gt;
&lt;p&gt;First step of a deployment pipeline, is usually a series of tests. After a commit is made, the code is checked out from
the source code repository and tested. Those are usually code style tests and unit tests.&lt;/p&gt;</description></item><item><title>Typical CI deployment pipeline - overview</title><link>https://mysteriouscode.com/blog/typical-ci-deployment-pipeline-overview/</link><pubDate>Fri, 23 Sep 2016 00:02:37 +0000</pubDate><guid>https://mysteriouscode.com/blog/typical-ci-deployment-pipeline-overview/</guid><description>&lt;div
					style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
				&lt;iframe
					src="https://player.vimeo.com/video/183889021?dnt=0"
						style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" allow="fullscreen"&gt;
				&lt;/iframe&gt;
			&lt;/div&gt;

&lt;p&gt;More details on each deployment phase with examples, will be posted at our blog over the coming weeks, so check back
soon.&lt;/p&gt;</description></item></channel></rss>