<?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 - Senior AWS, DevOps &amp; security engineering</title><link>https://mysteriouscode.com/blog/</link><description>Recent content in Blog on Mysterious Code - Senior AWS, DevOps &amp; security engineering</description><generator>Hugo</generator><language>en-gb</language><lastBuildDate>Mon, 10 Aug 2026 08:00:00 +0000</lastBuildDate><atom:link href="https://mysteriouscode.com/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>The deployment that lied: ECS singletons and false success</title><link>https://mysteriouscode.com/blog/the-deployment-that-lied-ecs-singletons-and-false-success/</link><pubDate>Mon, 10 Aug 2026 08:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/the-deployment-that-lied-ecs-singletons-and-false-success/</guid><description>&lt;p&gt;We deployed a container that exits with code 1 five seconds after it starts. Not a subtle failure - the process dies almost immediately, every time. ECS marked the deployment &lt;code&gt;SUCCESSFUL&lt;/code&gt;. The service events said &amp;ldquo;reached a steady state&amp;rdquo;, &lt;strong&gt;twice&lt;/strong&gt;. CloudFormation took the stack to &lt;code&gt;UPDATE_COMPLETE&lt;/code&gt; in 4 minutes 36 seconds, a perfectly ordinary time for this service. Every layer a pipeline could check said the release went out cleanly. Meanwhile the service was down before the first new task launched, and it stayed down, relaunching a dead container roughly every 50 seconds, indefinitely. Nothing was going to notice. This post is the story of that deployment: why it&amp;rsquo;s in-contract behaviour rather than a bug, and the configuration that closes the gap.&lt;/p&gt;</description></item><item><title>ECS deployment alarms: the fine print</title><link>https://mysteriouscode.com/blog/ecs-deployment-alarms-the-fine-print/</link><pubDate>Fri, 07 Aug 2026 08:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/ecs-deployment-alarms-the-fine-print/</guid><description>&lt;p&gt;Deployment alarms are the easiest of the ECS failure detectors to describe. You name some CloudWatch
alarms on the service, and if one goes into &lt;code&gt;ALARM&lt;/code&gt; during a deployment, ECS fails that deployment and
rolls it back. We ran that path repeatedly against both a blue/green service and a rolling one, and the
mechanism was never the interesting part. What matters is how late the alarm arrives, what a quiet metric
does to it afterwards, and the documented behaviour that switches monitoring off at the worst (or best?) possible
moment. Every number below comes from a measured run (July 2026, eu-west-1).&lt;/p&gt;</description></item><item><title>ECS circuit breaker and CloudFormation: who owns the rollback</title><link>https://mysteriouscode.com/blog/ecs-circuit-breaker-and-cloudformation-who-owns-the-rollback/</link><pubDate>Wed, 05 Aug 2026 09:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/ecs-circuit-breaker-and-cloudformation-who-owns-the-rollback/</guid><description>&lt;p&gt;This post is about the question that started the whole series: when an ECS deployment fails while CloudFormation
is driving, who puts things back - ECS, CloudFormation, or both, one after the other? We had once watched a service
roll back twice in a row on another stack, every task replaced once by ECS and then again by CloudFormation, and that
fear is why we built the test stack. Nothing in the AWS documentation says what happens to a service resource when
ECS rolls a deployment back in the middle of a stack update. So we measured it: deployments where the new tasks
never come good, first with no failure detector at all, then with the circuit breaker in both of its modes, on both
deployment strategies. Every number below comes from a measured run (July 2026, eu-west-1).&lt;/p&gt;</description></item><item><title>ECS rolling deployments: what "done" actually means</title><link>https://mysteriouscode.com/blog/ecs-rolling-deployments-what-done-actually-means/</link><pubDate>Mon, 03 Aug 2026 08:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/ecs-rolling-deployments-what-done-actually-means/</guid><description>&lt;p&gt;Rolling is the ECS deployment strategy most people start with, and the one everyone assumes they already
understand. Old tasks out, new tasks in, two percentages to control the pace. The percentages are documented
properly. What the documentation never actually defines is when a rolling deployment is &lt;em&gt;done&lt;/em&gt;. Three separate
layers each declare completion at their own moment (the deployment record, the service&amp;rsquo;s own events, and the
CloudFormation resource), and on an update they disagree by well over a minute. We measured where each one
lands, on two very different rolling services, and this post is what came out of it.&lt;/p&gt;</description></item><item><title>ECS pause hooks: a real smoke test phase, and where they do nothing</title><link>https://mysteriouscode.com/blog/ecs-pause-hooks-a-real-smoke-test-phase-and-where-they-do-nothing/</link><pubDate>Fri, 31 Jul 2026 09:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/ecs-pause-hooks-a-real-smoke-test-phase-and-where-they-do-nothing/</guid><description>&lt;p&gt;When we measured a full ECS blue/green deployment in
&lt;a href="https://mysteriouscode.com/blog/ecs-native-blue-green-deployments-with-cloudformation-how-it-actually-works/"&gt;the first post of this series&lt;/a&gt;,
one number stood out: 28 seconds. That&amp;rsquo;s how long the new revision sits on the test listener
before production traffic shifts to it, and it&amp;rsquo;s the only period in which a smoke test could
stop a bad release before users see it. No realistic test suite fits in that time. Pause hooks are the fix.
Announced in &lt;a href="https://aws.amazon.com/about-aws/whats-new/2026/05/amazon-ecs-pause-continue-deployments/"&gt;May 2026&lt;/a&gt;,
they make the deployment stop at a stage you choose and wait for you, turning those 28 seconds
into a smoke test phase of whatever length you need. Third-party coverage of the feature is
still close to zero, so we measured the whole workflow on our test stack: the continue path,
the rollback path, an alarm firing mid-pause, and one case where the hook is accepted and then
does nothing at all. Every number below comes from a measured run (July 2026, eu-west-1).&lt;/p&gt;</description></item><item><title>ECS native blue/green deployments with CloudFormation: how it actually works</title><link>https://mysteriouscode.com/blog/ecs-native-blue-green-deployments-with-cloudformation-how-it-actually-works/</link><pubDate>Mon, 27 Jul 2026 08:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/ecs-native-blue-green-deployments-with-cloudformation-how-it-actually-works/</guid><description>&lt;p&gt;In July 2025, ECS introduced a &lt;a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-blue-green.html"&gt;native blue/green deployment type&lt;/a&gt;
comprising two target groups, a test listener, a bake period and managed rollback, all of which are run by ECS itself
with no involvement from CodeDeploy. The documentation covers the ideal scenario. However, it says much less about how
the feature behaves with CloudFormation on top, such as where &lt;code&gt;UPDATE_COMPLETE&lt;/code&gt;
lands relative to the bake, how long each stage really takes and whether stack updates end up conflicting with the
listener rules that the feature rewrites. We built a small test stack and ran the machinery repeatedly, documenting
everything. This post opens a series on how ECS deployment strategies behave when driven by CloudFormation - every
number in it comes from a measured run.&lt;/p&gt;</description></item><item><title>Composer's HTTP/2 400 failures from codeload.github.com in CI</title><link>https://mysteriouscode.com/blog/composer-http2-400-from-codeload-in-ci/</link><pubDate>Mon, 29 Jun 2026 09:00:00 +0000</pubDate><guid>https://mysteriouscode.com/blog/composer-http2-400-from-codeload-in-ci/</guid><description>&lt;p&gt;We hit a frustrating issue recently while building PHP images in AWS CodeBuild: &lt;code&gt;composer install&lt;/code&gt;
started failing, often, with an &lt;code&gt;HTTP/2 400&lt;/code&gt; from &lt;code&gt;codeload.github.com&lt;/code&gt; while downloading a package
archive. The package that failed changed from run to run, and the &lt;em&gt;same&lt;/em&gt; Dockerfile and
&lt;code&gt;composer.lock&lt;/code&gt; that broke in one pipeline built cleanly in another. The short version is that this
is GitHub wobbling rather than anything wrong in your project, that the same failure has come and
gone for years, and that the usual environment-variable fixes only take the edge off. If your
deployments run &lt;code&gt;composer install&lt;/code&gt;, here is what is actually going on and how to stop it taking your
builds down.&lt;/p&gt;</description></item><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>Mysterious Code at Cloud &amp; AI Infrastructure - meet us at Tech Show London 2025</title><link>https://mysteriouscode.com/blog/mysterious-code-at-cloud-ai-infrastructure-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-meet-us-at-tech-show-london-2025/</guid><description>&lt;p&gt;We&amp;rsquo;re excited to announce that Mysterious Code will be part of the &lt;a href="https://www.cloudaiinfrastructure.com/MysteriousCodeDolptec"&gt;Cloud &amp;amp; AI Infrastructure event at Tech Show London
2025&lt;/a&gt;!&lt;/p&gt;</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&gt;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&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>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&gt;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&gt;</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&gt;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&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>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&gt;After &lt;a href="https://mysteriouscode.com/blog/complete-code-cross-region-rds-recovery/"&gt;my previous post&lt;/a&gt; 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&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>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&gt;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&gt;</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&gt;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"&gt;stage object&amp;rsquo;s&lt;/a&gt; &lt;code&gt;MethodSettings&lt;/code&gt;
property seems to allow you to only do that for a specific resource and method.&lt;/p&gt;</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&gt;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&gt;
&lt;p&gt;Even if you&amp;rsquo;re using &lt;a href="https://github.com/cloudtools/troposphere"&gt;troposphere&lt;/a&gt; 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&gt;</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&gt;Fancy getting in touch with us? Have a question or want 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&gt;</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&gt;When using &lt;a href="https://aws.amazon.com/elasticsearch-service/"&gt;AWS ElasticSearch Service&lt;/a&gt;, 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&gt;</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&gt;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&gt;</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&gt;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&gt;</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&gt;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&gt;</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&gt;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&gt;</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&gt;Recently &lt;a href="https://aws.amazon.com/about-aws/whats-new/2017/01/elasticsearch-5-now-available-on-amazon-elasticsearch-service/"&gt;AWS announced support for Elasticsearch 5.1&lt;/a&gt;
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&gt;Creating Elasticsearch Domain did not stabilize&lt;/strong&gt;&amp;rdquo;. Here&amp;rsquo;s what I did to solve it.&lt;/p&gt;</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&gt;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&gt;</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&gt;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&gt;</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&gt;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&gt;
&lt;figure class="blog-img-max"&gt;&lt;img src="https://mysteriouscode.com/images/blog/2017/01/redshiftpic_hu_564941bbfe012838.png" srcset="https://mysteriouscode.com/images/blog/2017/01/redshiftpic_hu_5f70c5e4a4ca6634.webp 320w, https://mysteriouscode.com/images/blog/2017/01/redshiftpic_hu_7b932dbe59417e93.webp 640w, https://mysteriouscode.com/images/blog/2017/01/redshiftpic_hu_19c050d9b6653304.webp 960w, https://mysteriouscode.com/images/blog/2017/01/redshiftpic_hu_d09ffec6459d17ff.webp 1024w" sizes="(max-width: 800px) 100vw, 800px" loading="lazy"&gt;&lt;/figure&gt;</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&gt;&lt;strong&gt;Since publishing this post, AWS reached out to us about the RR pricing. See bottom of the post for the update.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;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&gt;
&lt;figure class="blog-img-max"&gt;&lt;img src="https://mysteriouscode.com/images/blog/2017/01/aws-price_hu_33799508b5258b94.png" srcset="https://mysteriouscode.com/images/blog/2017/01/aws-price_hu_4554802647967a26.webp 320w, https://mysteriouscode.com/images/blog/2017/01/aws-price_hu_3784a107476bd3a.webp 640w, https://mysteriouscode.com/images/blog/2017/01/aws-price_hu_aa9d23d5ee3f6187.webp 960w, https://mysteriouscode.com/images/blog/2017/01/aws-price_hu_8609b9f75000252a.webp 1024w" sizes="(max-width: 800px) 100vw, 800px" loading="lazy"&gt;&lt;/figure&gt;</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&gt;Last week I made an attempt at passing one of the new AWS Specialty exams - Security.&lt;/p&gt;</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&gt;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"&gt;DHCP implementation in PHP&lt;/a&gt; seems to work quite well!&lt;/p&gt;</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&gt;Recently, I became a fan of &lt;a href="https://www.yubico.com/"&gt;YubiKeys&lt;/a&gt; - 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&gt;</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&gt;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&gt;</description></item><item><title>Invalid permissions on Lambda function: fixing API Gateway in 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&gt;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 - see &lt;a href="https://mysteriouscode.com/blog/deploying-apigateway-and-lambda-with-cloudformation/"&gt;deploying API Gateway and
Lambda with CloudFormation&lt;/a&gt; for the basic
setup. 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&gt;{&amp;quot;message&amp;quot;: &amp;quot;Internal server error&amp;quot;}&lt;/code&gt; is thrown from their API Gateway endpoint.&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="code-block" data-lang="shell"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-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;&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>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&gt;&lt;strong&gt;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/"&gt;Complete code: cross-region RDS recovery&lt;/a&gt;&lt;/strong&gt;
.&lt;/p&gt;
&lt;p&gt;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&gt;
&lt;p&gt;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/"&gt;but they do happen&lt;/a&gt;! 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&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>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&gt;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&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><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&gt;If you&amp;rsquo;ve ever wrote &lt;a href="https://aws.amazon.com/cloudformation/"&gt;AWS CloudFormation&lt;/a&gt; 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"&gt;Python&amp;rsquo;s library &amp;ldquo;Troposphere&amp;rdquo;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;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&gt;</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&gt;The following eval&amp;rsquo;ed code was caused a lot of misunderstanding: &lt;a href="https://eval.in/61309"&gt;https://eval.in/61309&lt;/a&gt;. The
code looks like this:&lt;/p&gt;
&lt;div class="code-block" data-lang="php"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span style="display:flex;"&gt;&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:#6c6f74"&gt;1&lt;/span&gt;&lt;span&gt;$a &lt;span style="color:#81a1c1"&gt;=&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;2a0&amp;#34;&lt;/span&gt;&lt;span style="color:#eceff4"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&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:#6c6f74"&gt;2&lt;/span&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&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:#6c6f74"&gt;3&lt;/span&gt;&lt;span&gt;&lt;span style="color:#81a1c1;font-weight:bold"&gt;for&lt;/span&gt;&lt;span style="color:#eceff4"&gt;(&lt;/span&gt;$i &lt;span style="color:#81a1c1"&gt;=&lt;/span&gt; &lt;span style="color:#b48ead"&gt;0&lt;/span&gt;&lt;span style="color:#eceff4"&gt;;&lt;/span&gt; $i &lt;span style="color:#81a1c1"&gt;&amp;lt;&lt;/span&gt; &lt;span style="color:#b48ead"&gt;50&lt;/span&gt;&lt;span style="color:#eceff4"&gt;;&lt;/span&gt; $i&lt;span style="color:#81a1c1"&gt;++&lt;/span&gt;&lt;span style="color:#eceff4"&gt;)&lt;/span&gt; &lt;span style="color:#eceff4"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&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:#6c6f74"&gt;4&lt;/span&gt;&lt;span&gt; &lt;span style="color:#81a1c1;font-weight:bold"&gt;print&lt;/span&gt; &lt;span style="color:#a3be8c"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#a3be8c"&gt;$a&lt;/span&gt;&lt;span style="color:#ebcb8b"&gt;\n&lt;/span&gt;&lt;span style="color:#a3be8c"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#eceff4"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&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:#6c6f74"&gt;5&lt;/span&gt;&lt;span&gt; $a&lt;span style="color:#81a1c1"&gt;++&lt;/span&gt;&lt;span style="color:#eceff4"&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&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:#6c6f74"&gt;6&lt;/span&gt;&lt;span&gt;&lt;span style="color:#eceff4"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</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&gt;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&gt;</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&gt;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"&gt;Zend has a very nice implementation for it&lt;/a&gt;,
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"&gt;&amp;ldquo;handmadeimap&amp;rdquo; project done by Pete Warder&lt;/a&gt; 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"&gt;X-GM-RAW&lt;/a&gt; extension to SEARCH command.&lt;/p&gt;</description></item></channel></rss>