<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Blog on Mysterious Code - Your AWS &amp; DevOps consultants</title><link>https://mysteriouscode.com/blog/</link><description>Recent content in Blog on Mysterious Code - Your AWS &amp; DevOps consultants</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 18 Feb 2025 11:00:00 +0000</lastBuildDate><atom:link href="https://mysteriouscode.com/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>Mysterious Code at Cloud &amp; AI Infrastructure event – Meet Us at Tech Show London 2025!</title><link>https://mysteriouscode.com/blog/mysterious-code-at-cloud-ai-infrastructure-event-meet-us-at-tech-show-london-2025/</link><pubDate>Tue, 18 Feb 2025 11:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/mysterious-code-at-cloud-ai-infrastructure-event-meet-us-at-tech-show-london-2025/</guid><description>&lt;p>We’re excited to announce that Mysterious Code will be part of &lt;a href="https://www.cloudaiinfrastructure.com/MysteriousCodeDolptec">&lt;strong>Cloud &amp;amp; AI Infrastructure&lt;/strong> event at &lt;strong>Tech Show London
2025&lt;/strong>&lt;/a>!
&lt;a href="https://www.cloudaiinfrastructure.com/MysteriousCodeDolptec">&lt;figure class="blog-block-img">&lt;img src="https://mysteriouscode.com/images/blog/2025/02/ce115_landscape.png"
 alt="cloud and it infraustructure event">
&lt;/figure>
&lt;/a>&lt;/p>
&lt;p>Join us at &lt;strong>ExCeL London, Stand CE115, on March 12-13, 2025&lt;/strong>, where we’ll be diving into all things AWS infrastructure
— from cloud-native applications and DevOps automation to security reviews and cost optimization. Whether you&amp;rsquo;re looking
to scale efficiently, strengthen your cloud security, or streamline operations, our team is ready to help.&lt;/p>
&lt;p>Let’s connect and explore how AWS can power your business!&lt;/p>
&lt;p>&lt;strong>📍 Where: ExCeL London, Stand CE115&lt;br>
📅 When: March 12-13, 2025&lt;/strong>&lt;/p>
&lt;p>Want to set up a meeting? &lt;a href="https://mysteriouscode.com/contact/">Drop us a message&lt;/a>&lt;/p></description></item><item><title>Mysterious Code Ltd is now part of AWS Public Sector Program</title><link>https://mysteriouscode.com/blog/mysterious-code-ltd-is-now-part-of-aws-public-sector-program/</link><pubDate>Fri, 19 Apr 2024 15:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/mysterious-code-ltd-is-now-part-of-aws-public-sector-program/</guid><description>&lt;p>As a member of the AWS Public Sector Partner Program, Mysterious Code Ltd will leverage its expertise to empower
government, education and nonprofit entities with secure, scalable, and compliant cloud solutions built on AWS infrastructure.
By combining AWS&amp;rsquo;s industry-leading cloud platform with Mysterious Code&amp;rsquo;s specialized knowledge and experience,
public sector customers can expect enhanced capabilities in areas such as data security, compliance, and cost optimization.&lt;/p></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>If you&amp;rsquo;re using CloudFormation, you probably know about &lt;a href="https://github.com/aws-cloudformation/cfn-lint">cfn-lint&lt;/a> - 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">considered a best practice by AWS&lt;/a>.
However, simply using &lt;code>validate-template&lt;/code> in the Console or CLI only validates the basic syntax of the template, 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">cfn-lint&lt;/a>
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>
&lt;p>You can use &lt;code>cfn-lint&lt;/code> 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>
&lt;p>That is where you can come across a hurdle: &lt;a href="https://github.com/aws-cloudformation/cfn-lint/issues/1025">cfn-lint does not have an official, up-to-date docker image&lt;/a>&lt;/p></description></item><item><title>Deploying AWS GuardDuty with CloudFormation for Master and Member accounts</title><link>https://mysteriouscode.com/blog/deploying-aws-guardduty-with-cloudformation-for-master-and-member-accounts/</link><pubDate>Tue, 01 May 2018 15:21:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/deploying-aws-guardduty-with-cloudformation-for-master-and-member-accounts/</guid><description>&lt;p>AWS GuardDuty analyses various events happening on your AWS account and can notify you when suspicious activity takes
place. Right now, GuardDuty is specific to a region and needs to be enabled in each region you want to monitor (though
AWS recommends you enable it in all regions to ensure global actions are monitored). Going through GuardDuty console in
every AWS region can be a daunting task, and quite time consuming if you have multiple AWS accounts which you&amp;rsquo;d like to
connect into Master-Member setup. Luckily, CloudFormation supports enabling and setting up GuardDuty detectors, so you
can use it to make it a little bit less painful.&lt;/p></description></item><item><title>Don't panic! False-positives from GuardDuty and Network Load Balancer (NLB)</title><link>https://mysteriouscode.com/blog/dont-panic-false-positives-from-guardduty-and-network-load-balancer-nlb/</link><pubDate>Tue, 20 Mar 2018 09:00:12 +0000</pubDate><guid>https://mysteriouscode.com/blog/dont-panic-false-positives-from-guardduty-and-network-load-balancer-nlb/</guid><description>&lt;p>If you&amp;rsquo;re keeping in touch with new services provided by AWS, you probably heard about new security monitoring tool:
GuardDuty. You probably also noticed a whole new family of Elastic Load Balancers (v2), which includes Network Load
Balancers (NLB). Deploying those two new services may generate some unexpected results - and here&amp;rsquo;s why.&lt;/p></description></item><item><title>Need help with Amazon Web Services (AWS)?</title><link>https://mysteriouscode.com/blog/need-help-with-amazon-web-services-aws/</link><pubDate>Mon, 19 Mar 2018 00:22:09 +0000</pubDate><guid>https://mysteriouscode.com/blog/need-help-with-amazon-web-services-aws/</guid><description>&lt;p>Thinking of moving into the Cloud or already in it, but have some questions? We are happy to help! No question is too
big or too small - we can offer help extending, modifying, auditing and optimising costs of your AWS operations. Whether
you have a one-off problem, or need ongoing support, &lt;a href="https://mysteriouscode.com/contact/">get in touch&lt;/a> and we&amp;rsquo;ll find
the answer for you.&lt;/p>
&lt;p>Examples of problems we&amp;rsquo;ve already solved for our clients:&lt;/p></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>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">aws-maintenance repo on GitHub&lt;/a> you&amp;rsquo;ll find a complete code and
CloudFormation template that will make this as painless a process as possible.&lt;/p></description></item><item><title>Cross-region RDS recovery: encryption and Aurora support</title><link>https://mysteriouscode.com/blog/cross-region-rds-recovery-encryption-and-aurora-support/</link><pubDate>Sat, 03 Feb 2018 00:45:22 +0000</pubDate><guid>https://mysteriouscode.com/blog/cross-region-rds-recovery-encryption-and-aurora-support/</guid><description>&lt;p>After &lt;a href="https://mysteriouscode.com/blog/complete-code-cross-region-rds-recovery/">my previous post&lt;/a> about a complete code for automated RDS
cross-region backup copy, some issues and new feature requests have been raised on GitHub (thanks for that!) - and with
your help, support for encrypted RDS instances and Aurora Clusters have now been added!&lt;/p></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>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/">Copying RDS snapshot to another region for cross-region recovery&lt;/a>)
, 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">a couple of pull requests&lt;/a> 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/">aws-maintenance&lt;/a> repository with a fully working code, which you
can easily customize via CloudFormation parameters to match your needs.&lt;/p></description></item><item><title>Sharing encrypted AMIs between AWS accounts (using Python and boto3)</title><link>https://mysteriouscode.com/blog/sharing-encrypted-amis-between-aws-accounts-using-python-and-boto3/</link><pubDate>Thu, 02 Nov 2017 18:00:08 +0000</pubDate><guid>https://mysteriouscode.com/blog/sharing-encrypted-amis-between-aws-accounts-using-python-and-boto3/</guid><description>&lt;p>Each Amazon Machine Image (AMI) holds information of the volumes and snapshots of those volumes that should be attached
to instances created from that AMI. To protect the data on those snapshots, you can choose to encrypt them using KMS.
Encrypting your data at rest is generally a good idea, though many companies choose to avoid encrypting their snapshots,
because sharing such snapshots between different AWS accounts (for example, Test and Production accounts) can be
difficult. That&amp;rsquo;s why I&amp;rsquo;m sharing details on how to make this as easy as possible (and automated!).&lt;/p></description></item><item><title>Enabling global API Gateway stage logging using CloudFormation</title><link>https://mysteriouscode.com/blog/enabling-global-api-gateway-stage-logging-using-cloudformation/</link><pubDate>Tue, 18 Jul 2017 09:42:49 +0000</pubDate><guid>https://mysteriouscode.com/blog/enabling-global-api-gateway-stage-logging-using-cloudformation/</guid><description>&lt;p>Enabling logging in API Gateway for your stage is fairly easy. You go into the Console, setup a role for API Gateway to
use for logging, find the stage and enable logs. It will enable logging for all methods within that stage. Doing the
same configuration using CloudFormation is not completely obvious though, as
the &lt;a href="http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html">stage object&amp;rsquo;s&lt;/a> &lt;code>MethodSettings&lt;/code>
property seems to allow you to only do that for a specific resource and method.&lt;/p></description></item><item><title>Using Magical Dictionaries to manage long CloudFormation templates with Troposphere</title><link>https://mysteriouscode.com/blog/using-magical-dictionaries-to-manage-long-cloudformation-templates-with-troposphere/</link><pubDate>Wed, 05 Jul 2017 15:09:03 +0000</pubDate><guid>https://mysteriouscode.com/blog/using-magical-dictionaries-to-manage-long-cloudformation-templates-with-troposphere/</guid><description>&lt;p>When deploying infrastructure with CloudFormation, at some point you will reach a moment when your CloudFormation JSON
or YAML file is just too big. It will be too long to get a good overview of what&amp;rsquo;s in it, manage parameters and all
dependencies between resources within the template. Nested stacks may be a solution, but if sometimes you can&amp;rsquo;t/won'
t/don&amp;rsquo;t use them for whatever reason (for example, it will get to complicated to manage tested stacks or their contents
are not reusable between other stacks).&lt;/p>
&lt;p>Even if you&amp;rsquo;re using &lt;a href="https://github.com/cloudtools/troposphere">troposphere&lt;/a> to generate your templates, you&amp;rsquo;ll face
the same issue - a very long Python file. Luckily, if you are using troposphere, you&amp;rsquo;re inherently using Python - which
means you can take advantage of it.&lt;/p></description></item><item><title>Want to get in touch? Meet us at events this month!</title><link>https://mysteriouscode.com/blog/want-to-get-in-touch-meet-us-at-events-this-month/</link><pubDate>Fri, 09 Jun 2017 10:00:30 +0000</pubDate><guid>https://mysteriouscode.com/blog/want-to-get-in-touch-meet-us-at-events-this-month/</guid><description>&lt;p>Fancy getting in touch with us? Have a question or what to know a bit more about our work? June is the month of
conferences in London, and we will be attending them! Here are the details where and when to meet us:&lt;/p></description></item><item><title>Video course: Exploring AWS Instances, Networking, and Databases</title><link>https://mysteriouscode.com/blog/video-course-exploring-aws-instances-networking-and-databases/</link><pubDate>Wed, 07 Jun 2017 06:00:28 +0000</pubDate><guid>https://mysteriouscode.com/blog/video-course-exploring-aws-instances-networking-and-databases/</guid><description>&lt;p>Interested in getting a bit more hands-on with
AWS? &lt;a href="https://www.packtpub.com/virtualization-and-cloud/exploring-aws-instances-networking-and-databases-video">My first video course&lt;/a>
prepared with Packt Publishing, exploring server-based (more &amp;ldquo;classic&amp;rdquo;) AWS components, like EC2 instances, VPC, RDS,
ElasticCache, S3 and even ECS and ECR for running docker containers has been published!&lt;/p>
&lt;p>The course is meant for people who have used AWS before and have basic familiarly with their services and would like to
get their knowledge onto &amp;ldquo;the next level&amp;rdquo; (maybe a more practical one!). I tried to include bits of know-how, various
tips and tricks and gotchas that I found during my experience with AWS so far.&lt;/p>
&lt;p>If you&amp;rsquo;re
interested, &lt;a href="https://www.packtpub.com/virtualization-and-cloud/exploring-aws-instances-networking-and-databases-video">check out the course on Packt Publishing website&lt;/a>!&lt;/p></description></item><item><title>Controlling access to AWS ElasticSearch Service clusters with IAM</title><link>https://mysteriouscode.com/blog/controlling-access-to-aws-elasticsearch-service-clusters-with-iam/</link><pubDate>Mon, 05 Jun 2017 10:00:52 +0000</pubDate><guid>https://mysteriouscode.com/blog/controlling-access-to-aws-elasticsearch-service-clusters-with-iam/</guid><description>&lt;p>When using &lt;a href="https://aws.amazon.com/elasticsearch-service/">AWS ElasticSearch Service&lt;/a>, you have multiple ways of
controlling access to your cluster. AWS Console gives you some pre-set policies you can use, but the ways of access can
be confusing. Using the IP-based access, you can allow access from your EC2 instances. But what if you want to access
your cluster from a Lambda?&lt;/p></description></item><item><title>S3 bucket permissions: what does "everyone" mean?</title><link>https://mysteriouscode.com/blog/s3-bucket-permissions-what-does-everyone-mean/</link><pubDate>Wed, 10 May 2017 20:47:05 +0000</pubDate><guid>https://mysteriouscode.com/blog/s3-bucket-permissions-what-does-everyone-mean/</guid><description>&lt;p>On more than one occasion I have seen S3 bucket policies set for the predefined users groups: &amp;ldquo;Everyone&amp;rdquo; and &amp;ldquo;Any
authenticated AWS user&amp;rdquo;, but rarely has it been done with understanding of what those groups actually mean. So, if
you&amp;rsquo;ve ever set (or thought of setting) permissions for those, please read on.&lt;/p></description></item><item><title>Comparsion of Ansible and Puppet exams by Red Hat</title><link>https://mysteriouscode.com/blog/comparsion-of-ansible-and-puppet-exams-by-red-hat/</link><pubDate>Fri, 21 Apr 2017 12:26:11 +0000</pubDate><guid>https://mysteriouscode.com/blog/comparsion-of-ansible-and-puppet-exams-by-red-hat/</guid><description>&lt;p>I had an opportunity to take both exams related to those two most popular automation and configuration management
frameworks. Here are some thoughts about the Red
Hat&amp;rsquo;s &lt;a href="https://www.redhat.com/en/services/training/ex405-red-hat-certificate-expertise-configuration-management-puppet">405 (Puppet)&lt;/a>
and &lt;a href="https://www.redhat.com/en/services/training/ex407-red-hat-certificate-expertise-ansible-automation">407 (Ansible)&lt;/a>
exams.&lt;/p></description></item><item><title>Granting privileges using MAC Framework</title><link>https://mysteriouscode.com/blog/granting-privileges-using-mac-framework/</link><pubDate>Mon, 17 Apr 2017 14:41:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/granting-privileges-using-mac-framework/</guid><description>&lt;p>FreeBSD&amp;rsquo;s kernel provides quite sophisticated privilege model that extends the traditional UNIX user-and-group one. Here
I&amp;rsquo;ll show how to leverage it to grant access to specific privileges to group of non-root users.&lt;/p></description></item><item><title>Intrusion detection and prevention with AWS Lambda and DynamoDB streams</title><link>https://mysteriouscode.com/blog/intrusion-detection-and-prevention-with-aws-lambda-and-dynamodb-streams/</link><pubDate>Wed, 05 Apr 2017 10:00:07 +0000</pubDate><guid>https://mysteriouscode.com/blog/intrusion-detection-and-prevention-with-aws-lambda-and-dynamodb-streams/</guid><description>&lt;p>Intrusion detection system (IDS) and intrusion prevention system (IPS) tend to be expensive and complicated. In AWS, you
can go for much simpler solution - WAF. But that requires you to use Application Load Balancer or CloudFront. But even
with WAF, you have to manage a list IP addresses of attackers that should be blocked. Or, if you only ever need to block
single IPs for short periods of time, NACLs may be a much easier option! Here&amp;rsquo;s a walkthrough on how you can implement a
terribly simple (yet very powerful) intrusion detection and prevention in AWS with Lambda and DynamoDB Streams for a web
application.&lt;/p></description></item><item><title>Update on the deadline for AWS Specialty Beta exams</title><link>https://mysteriouscode.com/blog/update-on-the-deadline-for-aws-specialty-beta-exams/</link><pubDate>Mon, 03 Apr 2017 10:00:07 +0000</pubDate><guid>https://mysteriouscode.com/blog/update-on-the-deadline-for-aws-specialty-beta-exams/</guid><description>&lt;p>If you&amp;rsquo;re still waiting for the results of the AWS Specialty Beta exams (Security, Big Data or Networking), you are not
alone. The results and final versions of the exams were supposed to be released at the end of March. But March came and
went, and we only got one small update from AWS.&lt;/p></description></item><item><title>AWS Certified Solutions Architect vs DevOps exams - my subjective comparison</title><link>https://mysteriouscode.com/blog/aws-certified-solutions-architect-vs-devops-exams-my-subjective-comparison/</link><pubDate>Mon, 27 Mar 2017 10:00:55 +0000</pubDate><guid>https://mysteriouscode.com/blog/aws-certified-solutions-architect-vs-devops-exams-my-subjective-comparison/</guid><description>&lt;p>Last week, I finally had the time to schedule my AWS Certified Solutions Architect - Professional exam, which I passed
on Saturday. It&amp;rsquo;s been a while since I did the other AWS Professional level (DevOps) certificate, but I thought I&amp;rsquo;d
share my take on how the exams compare.&lt;/p></description></item><item><title>My thoughts on RedHat's EX403 exam</title><link>https://mysteriouscode.com/blog/my-thoughts-on-redhat-ex403-exam/</link><pubDate>Mon, 20 Mar 2017 10:00:16 +0000</pubDate><guid>https://mysteriouscode.com/blog/my-thoughts-on-redhat-ex403-exam/</guid><description>&lt;p>I&amp;rsquo;ve recently gained the &lt;strong>Certificate of Expertise in Enterprise Deployment and Systems Management&lt;/strong> after
passing &lt;a href="https://www.redhat.com/en/services/training/ex403-red-hat-certificate-expertise-deployment-systems-management-exam">EX403&lt;/a>
. I took the exam in the City of London as an individual session - this time on KOALA - Kiosk On A Laptop. On the
&lt;strong>RedHat&amp;rsquo;s&lt;/strong> site the exam is advertised to take three hours but after starting the exam I found that the clock shows four
hours.&lt;/p></description></item><item><title>Bug in KMS: encryption key that cannot be deleted</title><link>https://mysteriouscode.com/blog/bug-in-kms-encryption-key-that-cannot-be-deleted/</link><pubDate>Mon, 06 Mar 2017 10:00:24 +0000</pubDate><guid>https://mysteriouscode.com/blog/bug-in-kms-encryption-key-that-cannot-be-deleted/</guid><description>&lt;p>Recently, I noticed a weird KMS key on an AWS account - what was weird about it, was the fact that it wasn&amp;rsquo;t marked as
AWS-managed key, but no-one (not even root) could delete or modify the key!&lt;/p></description></item><item><title>Creating Elasticsearch Domain did not stabilize - can't create AWS Elasticsearch 5.1 with CloudFormation</title><link>https://mysteriouscode.com/blog/creating-elasticsearch-domain-did-not-stabilize-cant-create-aws-elasticsearch-5-1-with-cloudformation/</link><pubDate>Fri, 17 Feb 2017 12:19:59 +0000</pubDate><guid>https://mysteriouscode.com/blog/creating-elasticsearch-domain-did-not-stabilize-cant-create-aws-elasticsearch-5-1-with-cloudformation/</guid><description>&lt;p>Recently &lt;a href="https://aws.amazon.com/about-aws/whats-new/2017/01/elasticsearch-5-now-available-on-amazon-elasticsearch-service/">AWS announced support for Elasticsearch 5.1&lt;/a>
in their Elasticsearch Service. Today, I tried to upgrade an existing CloudFormation stack, previously using
Elasticsearch 2.3, to the new version and, after a very long wait, CloudFormation rolled back the stack with the
following error: &amp;ldquo;&lt;strong>Creating Elasticsearch Domain did not stabilize&lt;/strong>&amp;rdquo;. Here&amp;rsquo;s what I did to solve it.&lt;/p></description></item><item><title>Sandboxing the hypervisor</title><link>https://mysteriouscode.com/blog/sandboxing-the-hypervisor/</link><pubDate>Wed, 15 Feb 2017 20:13:41 +0000</pubDate><guid>https://mysteriouscode.com/blog/sandboxing-the-hypervisor/</guid><description>&lt;p>I&amp;rsquo;m pleased to announce that &lt;code>bhyve&lt;/code>, the &lt;strong>FreeBSD&lt;/strong>&amp;rsquo;s hypervisor, is now sandboxed using &lt;strong>Capsicum&lt;/strong> framework.&lt;/p></description></item><item><title>How to tag Redshift clusters (and others) in one place in AWS Console</title><link>https://mysteriouscode.com/blog/how-to-tag-redshift-clusters-and-others-in-one-place-in-aws-console/</link><pubDate>Fri, 03 Feb 2017 10:00:18 +0000</pubDate><guid>https://mysteriouscode.com/blog/how-to-tag-redshift-clusters-and-others-in-one-place-in-aws-console/</guid><description>&lt;p>Management page of Redshift in AWS Console does not currently allow you to add or modify tags on your clusters. That
doesn&amp;rsquo;t mean that Redshift resources cannot be tagged - almost everything from clusters to parameters groups can be
tagged through the Tag Editor.&lt;/p></description></item><item><title>Magic of dictionaries in Python</title><link>https://mysteriouscode.com/blog/magic-of-dictionaries-in-python/</link><pubDate>Mon, 30 Jan 2017 17:23:59 +0000</pubDate><guid>https://mysteriouscode.com/blog/magic-of-dictionaries-in-python/</guid><description>&lt;p>&lt;strong>Python&lt;/strong> supports well known data types, like lists and dictionaries that are easy to use. But can you cheat
interpreter to use easier semantics to access dict data?&lt;/p></description></item><item><title>Bypassing CloudTrail and CloudWatch monitoring of AWS API</title><link>https://mysteriouscode.com/blog/bypassing-cloudtrail-and-cloudwatch-monitoring-of-aws-api/</link><pubDate>Mon, 23 Jan 2017 21:13:14 +0000</pubDate><guid>https://mysteriouscode.com/blog/bypassing-cloudtrail-and-cloudwatch-monitoring-of-aws-api/</guid><description>&lt;p>Since AWS released CloudWatch Logs and allowed for automated streaming of CloudTrail events into CloudWatch, monitoring
API usage with CloudWatch metrics and alerts has become increasingly popular. It&amp;rsquo;s incredibly easy to set up and add
custom alerts on almost any API event. But is it actually going to notify you when an unauthorized person gains access?&lt;/p></description></item><item><title>Simple MAC policy in FreeBSD</title><link>https://mysteriouscode.com/blog/simple-mac-policy-in-freebsd/</link><pubDate>Mon, 16 Jan 2017 22:24:05 +0000</pubDate><guid>https://mysteriouscode.com/blog/simple-mac-policy-in-freebsd/</guid><description>&lt;p>Mandatory Access Control (MAC) Framework is one of the less known FreeBSD features. Let&amp;rsquo;s take a look on how to use it.&lt;/p></description></item><item><title>Adding more nodes to Redshift cluster doesn't always mean you get more space</title><link>https://mysteriouscode.com/blog/adding-more-nodes-to-redshift-cluster-doesnt-always-mean-you-get-more-space/</link><pubDate>Fri, 13 Jan 2017 17:33:03 +0000</pubDate><guid>https://mysteriouscode.com/blog/adding-more-nodes-to-redshift-cluster-doesnt-always-mean-you-get-more-space/</guid><description>&lt;p>AWS Redshift is a big data storage (&amp;ldquo;data warehousing&amp;rdquo;) solution for analytics. Based on PostgreSQL 8, it can combine up
to 128 largest nodes, giving you 2 petabytes for your data. Well, almost. You don&amp;rsquo;t get ALL that for your data.&lt;/p>
&lt;figure class="blog-img-max">&lt;img src="https://mysteriouscode.com/images/blog/2017/01/redshiftpic.png">
&lt;/figure></description></item><item><title>Capsicum helpers</title><link>https://mysteriouscode.com/blog/capsicum-helpers/</link><pubDate>Fri, 06 Jan 2017 20:44:01 +0000</pubDate><guid>https://mysteriouscode.com/blog/capsicum-helpers/</guid><description>&lt;p>Sandboxing applications using capsicum can sometimes lead to repeating some common patterns and duplicating large
amounts of code. Fortunately there is an easy solution.&lt;/p></description></item><item><title>AWS S3 storage classes pricing is not what you think</title><link>https://mysteriouscode.com/blog/aws-s3-storage-classes-pricing-is-not-what-you-think/</link><pubDate>Mon, 02 Jan 2017 10:00:45 +0000</pubDate><guid>https://mysteriouscode.com/blog/aws-s3-storage-classes-pricing-is-not-what-you-think/</guid><description>&lt;p>&lt;strong>Since publishing this post, AWS reached out to us about the RR pricing. See bottom of the post for the update.&lt;/strong>&lt;/p>
&lt;p>When storing data in S3, at some point everyone asks the question about storage classes. At first glance it looks more
or less simple - if you&amp;rsquo;re accessing your data less often, or it&amp;rsquo;s not very important, you can pay less. Until you look
into details, find all the asterisks and compare the actual numbers.&lt;/p>
&lt;figure class="blog-img-max">&lt;img src="https://mysteriouscode.com/images/blog/2017/01/aws-price.png">
&lt;/figure></description></item><item><title>First thoughts after AWS Certified Security - Specialty BETA exam</title><link>https://mysteriouscode.com/blog/first-thoughts-after-aws-certified-security-specialty-beta-exam/</link><pubDate>Mon, 19 Dec 2016 13:31:58 +0000</pubDate><guid>https://mysteriouscode.com/blog/first-thoughts-after-aws-certified-security-specialty-beta-exam/</guid><description>&lt;p>Last week I made an attempt at passing one of the new AWS Specialty exams - Security.&lt;/p></description></item><item><title>Why I give to FreeBSD Foundation</title><link>https://mysteriouscode.com/blog/why-i-give-to-freebsd-foundation/</link><pubDate>Fri, 16 Dec 2016 11:47:12 +0000</pubDate><guid>https://mysteriouscode.com/blog/why-i-give-to-freebsd-foundation/</guid><description>&lt;p>When the year comes to and end, it&amp;rsquo;s the final chance to help your favourite open source project!&lt;/p></description></item><item><title>DHCP implementation in... PHP</title><link>https://mysteriouscode.com/blog/dhcp-implementation-in-php/</link><pubDate>Mon, 12 Dec 2016 09:00:29 +0000</pubDate><guid>https://mysteriouscode.com/blog/dhcp-implementation-in-php/</guid><description>&lt;p>PHP is not usually used to implement network services - and generally for good reasons. Not because it can&amp;rsquo;t be done,
but rather because it&amp;rsquo;s not what it was meant to be used for. Although, if you think that PHP simply can&amp;rsquo;t be used for
anything other than serving your blog, think again. Because
my &lt;a href="https://github.com/pbudzon/dhcp-php">DHCP implementation in PHP&lt;/a> seems to work quite well!&lt;/p></description></item><item><title>Yet another utility capsicumised!</title><link>https://mysteriouscode.com/blog/yet-another-utility-capsicumised/</link><pubDate>Fri, 09 Dec 2016 21:49:50 +0000</pubDate><guid>https://mysteriouscode.com/blog/yet-another-utility-capsicumised/</guid><description>&lt;p>I&amp;rsquo;m pleased to announce that the work on sandboxing the &lt;code>dd&lt;/code> utility using &lt;strong>Capsicum&lt;/strong> framework has been successfully
completed and from today it&amp;rsquo;s &lt;a href="https://lists.freebsd.org/pipermail/svn-src-head/2016-December/094423.html">available&lt;/a>
in &lt;strong>FreeBSD-CURRENT&lt;/strong>.&lt;/p></description></item><item><title>Using PGP keys from YubiKey as SSH RSA keys on MacOS</title><link>https://mysteriouscode.com/blog/using-pgp-keys-from-yubikey-as-ssh-rsa-keys-on-macos/</link><pubDate>Mon, 05 Dec 2016 10:00:14 +0000</pubDate><guid>https://mysteriouscode.com/blog/using-pgp-keys-from-yubikey-as-ssh-rsa-keys-on-macos/</guid><description>&lt;p>Recently, I became a fan of &lt;a href="https://www.yubico.com/">YubiKeys&lt;/a> - hardware encryptions keys used for storage of PGP
keys, FIDO U2F (two-factor authentication) and more. The PGP keys stored on the device can also be used as RSA keys for
SSH authentication. The setup is quite simple on MacOS.&lt;/p></description></item><item><title>First thoughts on Amazon Lightsail</title><link>https://mysteriouscode.com/blog/first-thoughts-on-amazon-lightsail/</link><pubDate>Fri, 02 Dec 2016 20:22:05 +0000</pubDate><guid>https://mysteriouscode.com/blog/first-thoughts-on-amazon-lightsail/</guid><description>&lt;p>On the last AWS re:Invent in Las Vegas Amazon introduced several new products. One of them
is &lt;a href="https://amazonlightsail.com/">Lightsail&lt;/a> - a simply priced solution dedicated to VPS fans. But is it really Digital
Ocean killer?&lt;/p></description></item><item><title>What you need to know before using Packer's automatic spot instance biding</title><link>https://mysteriouscode.com/blog/what-you-need-to-know-before-using-packers-automatic-spot-instance-biding/</link><pubDate>Mon, 28 Nov 2016 20:37:05 +0000</pubDate><guid>https://mysteriouscode.com/blog/what-you-need-to-know-before-using-packers-automatic-spot-instance-biding/</guid><description>&lt;p>&lt;code>Packer&lt;/code> has the ability to auto-bid on spot instance prices for &lt;strong>AWS EC2&lt;/strong> but there are two things that you need to
understand that may discourage you from using that feature.&lt;/p></description></item><item><title>Best two-factor authentication (2FA) for Wordpress</title><link>https://mysteriouscode.com/blog/best-two-factor-authentication-2fa-for-wordpress/</link><pubDate>Fri, 25 Nov 2016 21:35:13 +0000</pubDate><guid>https://mysteriouscode.com/blog/best-two-factor-authentication-2fa-for-wordpress/</guid><description>&lt;p>When securing your Wordpress installation, there&amp;rsquo;s an abundance of tasks to be performed. One of them, and a very
important one, is enabling &lt;a href="https://pixelprivacy.com/resources/two-factor-authentication/">two-factor authentication&lt;/a>
for all users. Most popular way of doing that is by using a plugin that works with smartphone apps, like Google
Authenticator - but from what I saw those are either quite poor or require a payment to use for more than one user.
Recently, a new player has come to the scene, and they&amp;rsquo;re making quite a stir.&lt;/p></description></item><item><title>Deploying API Gateway and Lambda with CloudFormation</title><link>https://mysteriouscode.com/blog/deploying-apigateway-and-lambda-with-cloudformation/</link><pubDate>Mon, 21 Nov 2016 10:00:32 +0000</pubDate><guid>https://mysteriouscode.com/blog/deploying-apigateway-and-lambda-with-cloudformation/</guid><description>&lt;p>Combination of AWS API Gateway and Lambda functions is a flag example of every &amp;ldquo;serverless infrastructure&amp;rdquo;. When
deploying API Gateway with CloudFormation there are two different ways you can define your API: via Swagger template or
by directly defining your methods in CloudFormation template.&lt;/p></description></item><item><title>NAT, pf &amp; jails</title><link>https://mysteriouscode.com/blog/nat-pf-jails/</link><pubDate>Fri, 18 Nov 2016 16:53:21 +0000</pubDate><guid>https://mysteriouscode.com/blog/nat-pf-jails/</guid><description>&lt;p>Sometimes you want to use jails on the same hosts that do the NAT. That of course isn&amp;rsquo;t by any means a complicated task
and &lt;code>pf&lt;/code> can do that very easily. The problems begin when you want to connect from one jail to a NATed IP (in the
example 192.168.122.251) to a port that is redirected to another jail on the same system. Here is one of the solutions.&lt;/p></description></item><item><title>What's broken when deploying Lambda and API Gateway via CloudFormation</title><link>https://mysteriouscode.com/blog/whats-broken-when-deploying-lambda-and-api-gateway-via-cloudformation/</link><pubDate>Mon, 14 Nov 2016 19:22:45 +0000</pubDate><guid>https://mysteriouscode.com/blog/whats-broken-when-deploying-lambda-and-api-gateway-via-cloudformation/</guid><description>&lt;p>AWS Lambda and API Gateway are becoming synonymous with &amp;ldquo;serverless infrastructure&amp;rdquo; and getting more and more popular.
To deploy them in repeatable way, one of the tools I recommend is CloudFormation. There are many ways you can define
your API and your Lambda, but when connecting the two with CloudFormation there&amp;rsquo;s usually something that many people
miss, and only notice when &lt;code>{&amp;quot;message&amp;quot;: &amp;quot;Internal server error&amp;quot;}&lt;/code> is thrown from their API Gateway endpoint.&lt;/p></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>If you&amp;rsquo;ve tried running Packer with CentOS on AWS, you probably noticed this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span> sudo: sorry, you must have a tty to run sudo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Protecting against PHP shells</title><link>https://mysteriouscode.com/blog/protecting-against-php-shells/</link><pubDate>Mon, 07 Nov 2016 10:00:01 +0000</pubDate><guid>https://mysteriouscode.com/blog/protecting-against-php-shells/</guid><description>&lt;p>The less known feature of &lt;strong>PHP&lt;/strong> is the option to disable certain functions and classes. It may help securing your
application and web server by blocking rarely used, from the perspective of pure web experience, functions.&lt;/p></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>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></description></item><item><title>Capsicum and bhyve</title><link>https://mysteriouscode.com/blog/capsicum-and-bhyve/</link><pubDate>Mon, 31 Oct 2016 10:00:53 +0000</pubDate><guid>https://mysteriouscode.com/blog/capsicum-and-bhyve/</guid><description>&lt;p>Ever wondered how to protect your host from malicious activity in vm guests? How to keep parts of the hypervisor running
in userspace from being a source of access to underlying host? One of the layers can be sandboxing the hypervisor
itself!&lt;/p></description></item><item><title>Hi Fitbit, congrats on learning how to use CSRF tokens (almost)!</title><link>https://mysteriouscode.com/blog/hi-fitbit-congrats-on-learning-how-to-use-csrf-tokens-almost/</link><pubDate>Fri, 28 Oct 2016 10:00:20 +0000</pubDate><guid>https://mysteriouscode.com/blog/hi-fitbit-congrats-on-learning-how-to-use-csrf-tokens-almost/</guid><description>&lt;p>I got my first Fitbit tracker a couple of years ago and I&amp;rsquo;ve been a loyal Fitbit user since - I&amp;rsquo;m currently on my 3rd
tracker and my family has them too. Very quickly I became interested in getting a bit more information out of my data,
charting it across other health data I have available - so I went on to Fitbit&amp;rsquo;s website, as I was quite sure they must
have an API, right? Yes, they do. And yes, I can use it for free. Because, as Fitibit says, &amp;ldquo;your data is yours&amp;rdquo;.
Awesome. And then it turned out it&amp;rsquo;s not as much &amp;ldquo;my data&amp;rdquo; as &amp;ldquo;my totals&amp;rdquo;. Fitbit&amp;rsquo;s public API could only give me
aggregated data for each day, total number of steps each day, averages, etc. I wanted to get a count of my steps for
each 5-minute period, the same as I can see on Fitbit&amp;rsquo;s dashboard when I log in. It turned out that was not possible,
unless I had a commercial application, submit a request to Fitbit, and they decide it&amp;rsquo;s worth it. Boo. &lt;strong>(Please refer to
the bottom of this post for a note of the state of the API today)&lt;/strong>&lt;/p></description></item><item><title>SELinux, confined users and Systemtap</title><link>https://mysteriouscode.com/blog/selinux-confined-users-and-systemtap/</link><pubDate>Mon, 24 Oct 2016 10:00:03 +0000</pubDate><guid>https://mysteriouscode.com/blog/selinux-confined-users-and-systemtap/</guid><description>&lt;p>While we&amp;rsquo;re waiting for &lt;code>CVE-2016-5195&lt;/code> to be patched, &lt;strong>RedHat&lt;/strong> released a workaround for the most common form of the
exploit being run in the wild. It uses &lt;code>systemtap&lt;/code> to block access to &lt;code>mem_write&lt;/code> function.&lt;/p>
&lt;p>I wanted to apply it and started tests, only to find that &lt;code>stap&lt;/code> returned &lt;code>EPERM&lt;/code> while loading the module! As I&amp;rsquo;m
running with &lt;strong>SELinux&lt;/strong> enabled, I checked the &lt;code>/var/log/audit/audit.log&lt;/code>. Surprisingly there was no AVCs with deny!
Although most of the calls are audited, you can mark some to be silently dropped by audit. You can disable that filter
using &lt;code>semanage dontaudit off&lt;/code>. I run &lt;code>stap&lt;/code> again and… bingo!&lt;/p></description></item><item><title>Copying RDS snapshot to another region for cross-region recovery</title><link>https://mysteriouscode.com/blog/copying-rds-snapshot-to-another-region-for-cross-region-recovery/</link><pubDate>Fri, 21 Oct 2016 10:00:17 +0000</pubDate><guid>https://mysteriouscode.com/blog/copying-rds-snapshot-to-another-region-for-cross-region-recovery/</guid><description>&lt;p>&lt;strong>For an updated ready-to-use CloudFormation template of this code, see newer
post: &lt;a href="https://mysteriouscode.com/blog/complete-code-cross-region-rds-recovery/">Complete code: cross-region RDS recovery&lt;/a>&lt;/strong>
.&lt;/p>
&lt;p>Amazon RDS is a great database-as-a-service, which takes care of almost all database-related maintenance tasks for you -
everything from automated backups and patching to replication and fail-overs into another availability zones.&lt;/p>
&lt;p>Unfortunately all of this fails if the region where your RDS is hosted fails. Region-wide failures are very
rare, &lt;a href="https://aws.amazon.com/message/67457/">but they do happen&lt;/a>! RDS does not support cross-region replication at the
moment, so you cannot simply create a replica of your database in another region (unless you host the database on an EC2
instance and set up the replication yourself). The second-best option, to make sure you can restore your service quickly
in another region, is to always have a copy of your latest database backup in that region. In case of RDS, that can mean
copying automated snapshots. There is no option for AWS to do it automatically, but it can be easily scripted with AWS
Lambda functions.&lt;/p></description></item><item><title>FreeBSD on Raspberry Pi 3!</title><link>https://mysteriouscode.com/blog/freebsd-on-raspberry-pi-3/</link><pubDate>Mon, 17 Oct 2016 10:00:03 +0000</pubDate><guid>https://mysteriouscode.com/blog/freebsd-on-raspberry-pi-3/</guid><description>&lt;p>On Friday, 14th October, Oleksandr
Tymoshenko &lt;a href="https://lists.freebsd.org/pipermail/svn-src-head/2016-October/092716.html">committed&lt;/a> an initial support
for &lt;strong>RPI3&lt;/strong> into &lt;strong>FreeBSD&lt;/strong>. The system is able to boot in multiuser mode with single processor. SMP is being actively
worked on. For now, only the on-board Ethernet chip is supported and we will need to wait awhile for a WiFi and
Bluetooth support. The port is quite usable, and what&amp;rsquo;s more interesting - it&amp;rsquo;s full 64bit!&lt;/p></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>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>
&lt;p>&lt;img src="https://mysteriouscode.com/images/blog/2016/10/redhat-ansible-search.png" alt="redhat certification search results">&lt;/p></description></item><item><title>Capsicum: add some spice to your FreeBSD</title><link>https://mysteriouscode.com/blog/capsicum-add-some-spice-to-your-freebsd/</link><pubDate>Mon, 10 Oct 2016 10:00:08 +0000</pubDate><guid>https://mysteriouscode.com/blog/capsicum-add-some-spice-to-your-freebsd/</guid><description>&lt;p>Application sandboxes are getting more and more popular. There are multiple schools and implementations. Let&amp;rsquo;s see how
to use the FreeBSD&amp;rsquo;s Capsicum.&lt;/p></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>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/">check out the video where I describe a typical pipeline here&lt;/a>.
You can find the other parts of this series, by checking out the tag &lt;a href="https://mysteriouscode.com/blog/tag/ci-pipeline-series/">ci-pipeline-series&lt;/a>
.&lt;/p>
&lt;p>&lt;img src="https://mysteriouscode.com/images/blog/2016/10/pipeline-part-3.png" alt="pipeline-part-3">&lt;/p>
&lt;p>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">since AWS Auto scaling groups support the rolling updates&lt;/a>
out of the box.&lt;/p>
&lt;p>Or, if your applications requires blue-green deployments, using CloudFormation is almost essential.&lt;/p></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>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/">check out the video where I describe a typical pipeline here&lt;/a>.
You can find the other parts of this series, by checking out the
tag &lt;a href="https://mysteriouscode.com/blog/tag/ci-pipeline-series/">ci-pipeline-series&lt;/a>.&lt;/p>
&lt;p>&lt;img src="https://mysteriouscode.com/images/blog/2016/10/pipeline-part-2.png" alt="pipeline-part-2">&lt;/p>
&lt;p>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">Amazon Machine Image&lt;/a>), which can then be deployed
as a new instance in our environment.&lt;/p></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>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/">check out the video where I describe a typical pipeline here.&lt;/a>&lt;/p>
&lt;p>&lt;img src="https://mysteriouscode.com/images/blog/2016/09/pipeline-part-1.png" alt="pipeline-part-1">&lt;/p>
&lt;p>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></description></item><item><title>ELB ProxyProtocol with CloudFormation</title><link>https://mysteriouscode.com/blog/elb-proxyprotocol-with-cloudformation/</link><pubDate>Mon, 26 Sep 2016 10:12:42 +0000</pubDate><guid>https://mysteriouscode.com/blog/elb-proxyprotocol-with-cloudformation/</guid><description>&lt;p>When using AWS Elastic Load Balancer with TCP listeners (not HTTP or HTTPS), the biggest problem faced by many people is
the lack of client&amp;rsquo;s IP address. Since it&amp;rsquo;s TCP which works on a lower layer, the ELB does not add the X-Forwaded-For
header (like it does for HTTP and HTTPS). For some time, this meant that if you used those listeners, you had no way of
getting the original client&amp;rsquo;s IP address.&lt;/p></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;">
 &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">
 &lt;/iframe>
 &lt;/div>

&lt;p>More details on each deployment phase with examples, will be posted at our blog over the coming weeks, so check back
soon.&lt;/p></description></item><item><title>How to validate CloudFormation template with AWS CLI</title><link>https://mysteriouscode.com/blog/how-to-validate-cloudformation-template-with-aws-cli/</link><pubDate>Fri, 16 Sep 2016 16:33:36 +0000</pubDate><guid>https://mysteriouscode.com/blog/how-to-validate-cloudformation-template-with-aws-cli/</guid><description>&lt;p>Validating your template before uploading it to CloudFormation to create resources is probably the best thing you can do
to avoid the dreaded UPDATE_ROLLBACK_IN_PROGRESS status.&lt;/p>
&lt;p>This can easily be done without creating the stack, by using the &lt;code>validate-template&lt;/code> AWS CLI command.&lt;/p></description></item><item><title>Using Troposphere to create CloudFormation stack template</title><link>https://mysteriouscode.com/blog/using-troposphere-to-create-cloudformation-stack-template/</link><pubDate>Fri, 09 Sep 2016 15:12:49 +0000</pubDate><guid>https://mysteriouscode.com/blog/using-troposphere-to-create-cloudformation-stack-template/</guid><description>&lt;p>If you&amp;rsquo;ve ever wrote &lt;a href="https://aws.amazon.com/cloudformation/">AWS CloudFormation&lt;/a> template, you probably know that it
can be a daunting task. Luckily, it can be much easier, if you
use &lt;a href="https://github.com/cloudtools/troposphere">Python&amp;rsquo;s library &amp;ldquo;Troposphere&amp;rdquo;&lt;/a>.&lt;/p>
&lt;p>Troposphere lets you create Python objects in place of CloudFormation elements, does some basic validation of your
input and generates the JSON template for CloudFormation for you. It is much easier and cleaner to use that writing JSON
templates manually.&lt;/p></description></item><item><title>Automatic bootstrapping of pkg(7) in FreeBSD</title><link>https://mysteriouscode.com/blog/automatic-bootstrapping-of-pkg7-in-freebsd/</link><pubDate>Wed, 01 Jan 2014 14:48:21 +0000</pubDate><guid>https://mysteriouscode.com/blog/automatic-bootstrapping-of-pkg7-in-freebsd/</guid><description>&lt;p>Since &lt;strong>FreeBSD 10.0&lt;/strong> pkgng becomes new default packaging management system. To start using it you need to
run &lt;code>/usr/sbin/pkg boostrap&lt;/code> command that will fetch and install the whole new packaging system. It will politely ask
you if you are sure to proceed. The problem is when you want to automate your install you are hold by that interactive
question.&lt;/p></description></item><item><title>Peer to peer routing in FreeBSD</title><link>https://mysteriouscode.com/blog/peer-to-peer-routing-in-freebsd/</link><pubDate>Thu, 21 Nov 2013 14:42:51 +0000</pubDate><guid>https://mysteriouscode.com/blog/peer-to-peer-routing-in-freebsd/</guid><description>&lt;p>Some hosting providers started offering IPs or IP aliases with /32 bit mask (for
example &lt;a href="http://www.hetzner.de/">Hetzner&lt;/a>). Virtual interfaces such as &lt;code>gif&lt;/code> or &lt;code>tun&lt;/code> have built-in ability to act as
peer to peer devices and &lt;code>ifconfig&lt;/code> utility can use that ability to easily setup of these interfaces, but ethernet
devices need some special treatment.&lt;/p></description></item><item><title>In search of working devfs rules</title><link>https://mysteriouscode.com/blog/in-search-of-working-devfs-rules/</link><pubDate>Mon, 18 Nov 2013 14:33:45 +0000</pubDate><guid>https://mysteriouscode.com/blog/in-search-of-working-devfs-rules/</guid><description>&lt;p>On 10th Oct 2013 in revision &lt;a href="http://svnweb.freebsd.org/base?view=revision&amp;amp;revision=256256">r256256&lt;/a> FreeBSD has changed
rc.d script for running jails. The new version uses configuraion from &lt;code>/etc/jail.conf&lt;/code> file instead of &lt;code>/etc/rc.conf&lt;/code>
entries. This change exposed a problem where devfs was not importing default rules anymore - therefore
option &lt;code>devfs_ruleset&lt;/code> was ignored.&lt;/p></description></item><item><title>2a0++ misunderstanding</title><link>https://mysteriouscode.com/blog/2a0-misunderstanding/</link><pubDate>Fri, 08 Nov 2013 11:42:27 +0000</pubDate><guid>https://mysteriouscode.com/blog/2a0-misunderstanding/</guid><description>&lt;p>The following eval&amp;rsquo;ed code was caused a lot of misunderstanding: &lt;a href="https://eval.in/61309">https://eval.in/61309&lt;/a>. The
code looks like this:&lt;/p>
&lt;div class="highlight">&lt;div style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">
&lt;table style="border-spacing:0;padding:0;margin:0;border:0;">&lt;tr>&lt;td style="vertical-align:top;padding:0;margin:0;border:0;">
&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">1
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">2
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">3
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">4
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">5
&lt;/span>&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f">6
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%">
&lt;pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-php" data-lang="php">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#bb60d5">$a&lt;/span> &lt;span style="color:#666">=&lt;/span> &lt;span style="color:#4070a0">&amp;#34;2a0&amp;#34;&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#007020;font-weight:bold">for&lt;/span>(&lt;span style="color:#bb60d5">$i&lt;/span> &lt;span style="color:#666">=&lt;/span> &lt;span style="color:#40a070">0&lt;/span>; &lt;span style="color:#bb60d5">$i&lt;/span> &lt;span style="color:#666">&amp;lt;&lt;/span> &lt;span style="color:#40a070">50&lt;/span>; &lt;span style="color:#bb60d5">$i&lt;/span>&lt;span style="color:#666">++&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#007020;font-weight:bold">print&lt;/span> &lt;span style="color:#4070a0">&amp;#34;&lt;/span>&lt;span style="color:#70a0d0">$a\n&lt;/span>&lt;span style="color:#4070a0">&amp;#34;&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#bb60d5">$a&lt;/span>&lt;span style="color:#666">++&lt;/span>;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item><item><title>Node.js: using socket.io with cluster module</title><link>https://mysteriouscode.com/blog/node-js-using-socket-io-with-cluster-module/</link><pubDate>Sun, 26 Aug 2012 23:15:27 +0000</pubDate><guid>https://mysteriouscode.com/blog/node-js-using-socket-io-with-cluster-module/</guid><description>&lt;p>I&amp;rsquo;ve been recently working on a project that uses Node.js with cluster module and socket.io and I noticed that a lot of
people that try to use Node.js with socket.io have problems with how to make it work with cluster module.&lt;/p></description></item><item><title>Accessing Gmail with oAuth authorization in PHP</title><link>https://mysteriouscode.com/blog/accessing-gmail-with-oauth-authorization-in-php/</link><pubDate>Sun, 18 Dec 2011 15:00:22 +0000</pubDate><guid>https://mysteriouscode.com/blog/accessing-gmail-with-oauth-authorization-in-php/</guid><description>&lt;p>Recently, I&amp;rsquo;ve joined a project that required accessing Gmail accounts using oAuth authentication with PHP. It turns
out, that&amp;rsquo;s not such a very simple thing to do, especially with PHP - &lt;a href="http://code.google.com/p/google-mail-xoauth-tools/wiki/PhpSampleCode">Zend has a very nice implementation for it&lt;/a>,
but the wiki page is terribly old and outdated&amp;hellip; I&amp;rsquo;ve lost a few hours looking for a nice and clean solution and found
a &lt;a href="https://github.com/petewarden/handmadeimap">&amp;ldquo;handmadeimap&amp;rdquo; project done by Pete Warder&lt;/a> some time ago. Bad thing is,
the latest commit was done in 2010. The good thing: not much has changed since then, so the code works perfectly. It&amp;rsquo;s
even better to use that php-imap extension, as you need to use raw IMAP commands, which gives you the chance to use, for
example, gmail&amp;rsquo;s special &lt;a href="http://code.google.com/apis/gmail/imap/#x-gm-raw">X-GM-RAW&lt;/a> extension to SEARCH command.&lt;/p></description></item></channel></rss>