<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>AWS.NZ</title><link>https://aws.nz/</link><description>Recent content on AWS.NZ</description><generator>Hugo</generator><language>en-NZ</language><lastBuildDate>Sun, 25 Oct 2026 13:30:00 +1300</lastBuildDate><atom:link href="https://aws.nz/index.xml" rel="self" type="application/rss+xml"/><item><title>Fix Codex resume after switching AWS accounts on Bedrock</title><link>https://aws.nz/misc/codex-resume-bedrock-account-switch/</link><pubDate>Sun, 25 Oct 2026 13:30:00 +1300</pubDate><guid>https://aws.nz/misc/codex-resume-bedrock-account-switch/</guid><description>&lt;p&gt;I switched the AWS account used for Codex inference on Amazon Bedrock. An old chat still opened, but its next turn failed.&lt;/p&gt;
&lt;p&gt;The workaround was to remove the old account&amp;rsquo;s encrypted state from the saved chat. The original messages and tool results stayed in place. Codex could then replay that history without sending the old encrypted data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Observed outcome:&lt;/strong&gt; a local test confirmed that the repaired chat produced a request with no encrypted content. I applied the repair with a backup. Live Bedrock inference was not tested during this investigation.&lt;/p&gt;</description></item><item><title>Fine-tune Llama-2 with Amazon SageMaker JumpStart</title><link>https://aws.nz/projects/fine-tune-llama-2-with-amazon-sagemaker-jumpstart/</link><pubDate>Mon, 04 Dec 2023 19:48:49 +1300</pubDate><guid>https://aws.nz/projects/fine-tune-llama-2-with-amazon-sagemaker-jumpstart/</guid><description>&lt;p&gt;Customising Llama-2 for your task offers a cheaper and more secure LLM experience.&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://aws.nz/projects/fine-tune-llama-2-with-amazon-sagemaker-jumpstart/image-01.png"
 alt="Illustration of hands assembling glowing gears"&gt;&lt;figcaption&gt;
 &lt;p&gt;Image by author and DALL-E 3&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The advancements in Large Language Models over the past few months unleashed some interesting opportunities for text processing automation. Let’s take a look, for example, at removing &lt;em&gt;Personally Identifiable Information&lt;/em&gt; (PII) from free-form text data. Have a look at this call centre log (made-up example):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;October 10, 2023, 2:15 PM&lt;/strong&gt;, customer &lt;strong&gt;Maria Gonzalez&lt;/strong&gt; called in to inquire about her mortgage loan payments. Agent &lt;strong&gt;Brian Clark&lt;/strong&gt; confirmed the customer’s identity using a verification code sent to their mobile number &lt;strong&gt;027-456-7890&lt;/strong&gt; and by confirming her home address as &lt;strong&gt;45 Wellington St, Christchurch, 8010&lt;/strong&gt;. […]&lt;/p&gt;</description></item><item><title>Bitcoin mining on AWS in 2023 — the complete guide</title><link>https://aws.nz/projects/bitcoin-mining-on-aws-in-2023-the-complete-guide/</link><pubDate>Thu, 02 Nov 2023 21:46:27 +1300</pubDate><guid>https://aws.nz/projects/bitcoin-mining-on-aws-in-2023-the-complete-guide/</guid><description>&lt;p&gt;&lt;img src="image-01.jpg" alt="Illustration of a Bitcoin coin inside a circuit-board cloud"&gt;&lt;/p&gt;
&lt;p&gt;The last time I wrote about crypto mining on AWS we were still before “The Merge” — the (in)famous 2022 event when Ethereum switched from &lt;em&gt;Proof of Work&lt;/em&gt; to &lt;em&gt;Proof of Stake&lt;/em&gt; which spelled the end of ETH mining. The lucky people with free AWS accounts then switched to mining Ethereum Classic (ETC) or Ethereum POW (ETHW) but these were very unprofitable, yielding perhaps 10% or 20% max on a good day. And that’s not 20% profit, that’s getting $20 in crypto for $100 spent in AWS costs. Not a good deal.&lt;/p&gt;</description></item><item><title>Crypto mining on AWS and GCP after “The Merge”</title><link>https://aws.nz/projects/crypto-mining-on-aws-and-gcp/</link><pubDate>Tue, 06 Sep 2022 13:36:41 +1200</pubDate><guid>https://aws.nz/projects/crypto-mining-on-aws-and-gcp/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Yes, you can still mine crypto in the public clouds even after Ethereum switch to Proof of Stake!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="images/aws-gcp-crypto.jpg" alt="Mining crypto on AWS and GCP"&gt;&lt;/p&gt;
&lt;h3 id="ethereum-mining-and-the-merge"&gt;Ethereum mining and “The Merge”&lt;/h3&gt;
&lt;p&gt;For a long time Ethereum (ETH) used to be the favourite (= most profitable) crypto coin to mine on GPUs. People were building “mining rigs” — specialised computers equipped with lots and lots of NVidia or AMD Radeon GPUs — and operated them 24/7 in order to earn new ETH coins. The cost of setting up these rigs was massive, many thousands or even tens of thousands of dollars. And this upfront cost was obviously a big barrier for many wanna-be miners.&lt;/p&gt;</description></item><item><title>Setting up Fargate for ECS Exec</title><link>https://aws.nz/best-practice/setting-up-fargate-for-ecs-exec/</link><pubDate>Tue, 16 Aug 2022 10:25:04 +1200</pubDate><guid>https://aws.nz/best-practice/setting-up-fargate-for-ecs-exec/</guid><description>&lt;p&gt;Examples for both CloudFormation and Terraform.&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://aws.nz/best-practice/setting-up-fargate-for-ecs-exec/image-01.jpg"
 alt="Colourful painted steps with a handrail"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@ninjason"&gt;Jason Leung&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;In the &lt;a href="https://aws.nz/projects/login-to-fargate-containers-the-easy-way/"&gt;previous post&lt;/a&gt; I have introduced a new convenient &lt;strong&gt;ecs-session&lt;/strong&gt; tool for logging into your Fargate ECS containers through the ECS Exec mechanism. Today we’re going to explore the ECS configuration needed for &lt;strong&gt;ecs-session&lt;/strong&gt; to work.&lt;/p&gt;
&lt;h2 id="ecs-exec-requirements"&gt;ECS Exec requirements&lt;/h2&gt;
&lt;p&gt;The containers that you want to access via &lt;em&gt;ECS Exec&lt;/em&gt; / &lt;em&gt;ecs-session&lt;/em&gt; must meet the following requirements:&lt;/p&gt;</description></item><item><title>Easy Ethereum mining on GCP</title><link>https://aws.nz/projects/easy-ethereum-mining-on-gcp/</link><pubDate>Fri, 05 Aug 2022 19:14:48 +1200</pubDate><guid>https://aws.nz/projects/easy-ethereum-mining-on-gcp/</guid><description>&lt;p&gt;ETH mining will be gone in a month or two when the Ethereum network migrates to the long anticipated Proof-of-Stake model. While now it no longer makes sense to buy GPUs and build mining rigs it’s still perfectly possible to mine on the Google Cloud Platform.&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://aws.nz/projects/easy-ethereum-mining-on-gcp/image-01.jpg"
 alt="Gold Ethereum coin on a colourful background"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@kanchanara"&gt;Kanchanara&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;In the previous posts I have introduced an &lt;a href="https://aws.nz/projects/aws-instance-that-makes-eth-mining-profitable/"&gt;easy way to mine Ethereum (ETH) crypto currency on the AWS platform&lt;/a&gt;. Many readers asked me whether the same can be done on GCP, the popular &lt;em&gt;Google Cloud Platform&lt;/em&gt;. Of course it can be done! GCP also offers VM instances with NVidia GPU cards — namely Tesla T4, Tesla V100 and the super fast Tesla A100 — and we can use them for ETH mining.&lt;/p&gt;</description></item><item><title>Login to Fargate containers the easy way</title><link>https://aws.nz/projects/login-to-fargate-containers-the-easy-way/</link><pubDate>Thu, 07 Jul 2022 14:14:02 +1200</pubDate><guid>https://aws.nz/projects/login-to-fargate-containers-the-easy-way/</guid><description>&lt;p&gt;Discover ecs-session — the new easy to use tool for interactive access to ECS tasks&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://aws.nz/projects/login-to-fargate-containers-the-easy-way/image-01.jpg"
 alt="Rows of colourful lockers"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@moren"&gt;moren hsu&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Running apps in Docker containers comes with some challenges. Most notably we are not supposed to “login” to the containers and should only observe them from the outside. However let’s be honest — sometimes it may be handy to login to a running container and “do something”. For example we may want to check the network connectivity from the container point of view. Or to test access to the AWS services with the container’s IAM role credentials. Or to check some logs that we forgot to forward to CloudWatch. And so on. I’m not saying that we &lt;em&gt;should&lt;/em&gt; be doing it on daily basis, but sometimes it’s required…&lt;/p&gt;</description></item><item><title>Mining Ethereum on AWS — the complete guide</title><link>https://aws.nz/projects/mining-ethereum-on-aws-the-complete-guide/</link><pubDate>Wed, 01 Jun 2022 22:36:42 +1200</pubDate><guid>https://aws.nz/projects/mining-ethereum-on-aws-the-complete-guide/</guid><description>&lt;p&gt;Ethereum mining on AWS is now even easier with a ready to use template. Try it today because ETH mining may be over soon!&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://aws.nz/projects/mining-ethereum-on-aws-the-complete-guide/image-01.jpg"
 alt="Gold Ethereum coin on a chess board"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@kanchanara"&gt;Kanchanara&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The &lt;a href="https://github.com/mludvig/aws-ethereum-miner"&gt;AWS Ethereum Miner&lt;/a&gt; project has been around for over a year now and has seen a great interest from the miners during this time. With the looming end of Ethereum mining — aka ETH 2.0 or “the merge” (see below) — it no longer makes sense to invest in buying GPUs and mining rigs. There simply isn’t enough time to pay them off.&lt;/p&gt;</description></item><item><title>Create intelligent CloudFormation templates with Custom Resources</title><link>https://aws.nz/best-practice/create-intelligent-cloudformation-templates-with-custom-resources/</link><pubDate>Sun, 24 Apr 2022 18:25:10 +1200</pubDate><guid>https://aws.nz/best-practice/create-intelligent-cloudformation-templates-with-custom-resources/</guid><description>&lt;p&gt;When I wrote my first CloudFormation template to facilitate &lt;a href="https://aws.nz/projects/mining-bitcoin-and-other-crypto-on-aws/"&gt;Ethereum mining on AWS&lt;/a&gt; it was a relatively simple solution used only by me. I could handle the little inefficiencies here and there. But then I made it public and people started using it. And they ran into issues.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;“The template doesn’t work in region x-y-z!” &lt;em&gt;Oh…&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;“The template doesn’t work with instance type abc.xlarge!” &lt;em&gt;Oh…&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;“I want to use both spot and on-demand!” &lt;em&gt;Oh…&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;“Why is it starting g5.xlarge when g4ad.2xlarge is more efficient?” &lt;em&gt;Oh…&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To please the crowd I had to improve the template and make it more &lt;em&gt;intelligent&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>The new AWS instance that makes ETH mining profitable</title><link>https://aws.nz/projects/aws-instance-that-makes-eth-mining-profitable/</link><pubDate>Sun, 02 Jan 2022 12:38:00 +1300</pubDate><guid>https://aws.nz/projects/aws-instance-that-makes-eth-mining-profitable/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Mining Ethereum on AWS until now wasn’t profitable. This new AWS instance is the game changer that no only breaks even but can finally make you money!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src="images/7cma9zl5ddk.jpg" alt=""&gt;&lt;/p&gt;
&lt;p&gt;Ever since I wrote my first article about &lt;a href="https://aws.nz/projects/mining-bitcoin-and-other-crypto-on-aws/"&gt;Ethereum and Bitcoin mining on AWS&lt;/a&gt; more than a year ago I was bombarded over and over again with the same sort of questions :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Is it profitable now that &lt;em&gt;the ETH price has increased?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;… that &lt;em&gt;this new AWS instance type was released?&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;… that this &lt;em&gt;new coin is the hype of the day&lt;/em&gt;?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So far the answer was always a NO. The profitability has gradually improved from some $20 mined in ETH for every $100 spent on AWS services a year ago, to $60 or $65 in ETH for the same $100 AWS spent a month ago. You would still be losing money though.&lt;/p&gt;</description></item><item><title>Mining Ethereum in AWS — is it worth it?</title><link>https://aws.nz/projects/mining-ethereum-on-aws-is-it-worth-it/</link><pubDate>Mon, 06 Dec 2021 21:42:04 +1300</pubDate><guid>https://aws.nz/projects/mining-ethereum-on-aws-is-it-worth-it/</guid><description>&lt;p&gt;At around this time last year I wrote my first article about Mining Bitcoin and Ethereum on AWS and figured out that back then it wasn’t worth it. Over the past year the ETH price has increased from $450 to $4500 — let’s find out whether mining on AWS is finally profitable!&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://aws.nz/projects/mining-ethereum-on-aws-is-it-worth-it/image-01.jpg"
 alt="Gold Ethereum coin on a colourful background"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@executium"&gt;Executium&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;A lot has happened since I wrote my &lt;a href="https://aws.nz/projects/mining-bitcoin-and-other-crypto-on-aws/"&gt;previous article about mining on AWS&lt;/a&gt;:&lt;/p&gt;</description></item><item><title>Amazon Rekognition support for ZoneMinder object detection</title><link>https://aws.nz/projects/aws-rekognition-support-for-zoneminder-object-detection/</link><pubDate>Fri, 10 Sep 2021 17:38:40 +1200</pubDate><guid>https://aws.nz/projects/aws-rekognition-support-for-zoneminder-object-detection/</guid><description>&lt;p&gt;ZoneMinder is a popular open-source video surveillance system. AWS Rekognition is an easy to use image recognition service from Amazon. Together they are a perfect match.&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://aws.nz/projects/aws-rekognition-support-for-zoneminder-object-detection/image-01.jpg"
 alt="Close-up of a security camera lens"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@bernardhermant"&gt;Bernard Hermant&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;&lt;a href="https://zoneminder.com/"&gt;ZoneMinder&lt;/a&gt; is a remarkably versatile system. It’s compatible with pretty much any IP camera that you can buy, you can run it on your own server and therefore you don’t have to trust your security video feeds to some random vendor with &lt;a href="https://9to5mac.com/2021/05/17/huge-eufy-privacy-breach/"&gt;dubious security standards&lt;/a&gt;. Being open-source there are no monthly “subscription fees” nor any expensive optional “power packs”. It’s all free.&lt;/p&gt;</description></item><item><title>Mining Bitcoin and Ethereum on AWS</title><link>https://aws.nz/projects/mining-bitcoin-and-other-crypto-on-aws/</link><pubDate>Fri, 18 Dec 2020 21:23:28 +1300</pubDate><guid>https://aws.nz/projects/mining-bitcoin-and-other-crypto-on-aws/</guid><description>&lt;p&gt;The Bitcoin mania has struck again. With the BTC and ETH prices at all times high many people look for ways to take part in the frenzy. Start mining on AWS today using our easy to use CloudFormation template. Or better not? Let’s find out…&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://aws.nz/projects/mining-bitcoin-and-other-crypto-on-aws/image-01.jpg"
 alt="Gold Bitcoin coin on a stand in front of a trading chart"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@silverhousehd"&gt;André François McKenzie&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Typically you can obtain Bitcoins and other crypto-currencies in one of three ways: by &lt;em&gt;buying&lt;/em&gt; them, &lt;em&gt;trading&lt;/em&gt; them or &lt;em&gt;mining&lt;/em&gt; them. Here we will have a look at the latter option — mining crypto on AWS.&lt;/p&gt;</description></item><item><title>Recover lost access to your EC2 instance</title><link>https://aws.nz/best-practice/recover-lost-access-to-your-ec2-instance/</link><pubDate>Thu, 06 Aug 2020 17:06:42 +1200</pubDate><guid>https://aws.nz/best-practice/recover-lost-access-to-your-ec2-instance/</guid><description>&lt;p&gt;I’m being asked the same question over and over again:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I got locked out of my EC2 instance! I did “something” and now I can’t SSH to it. How do I fix that?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;figure&gt;&lt;img src="https://aws.nz/best-practice/recover-lost-access-to-your-ec2-instance/image-01.jpg"
 alt="Man in a hoodie holding his head in his hand"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@jonathanrados"&gt;Jonathan Rados&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Usually this happens during server hardening or some other “fixing the server” attempts gone wrong. From turning on the &lt;em&gt;iptables&lt;/em&gt; firewall without leaving port 22 open, through changing some file or directory &lt;em&gt;permissions&lt;/em&gt;, to right out messing up the SSH daemon &lt;em&gt;configuration&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Analyse PDFs at Scale with Amazon Textract — Part 2</title><link>https://aws.nz/projects/analyse-pdfs-at-scale-with-amazon-textract-part-2/</link><pubDate>Tue, 26 May 2020 11:11:45 +1200</pubDate><guid>https://aws.nz/projects/analyse-pdfs-at-scale-with-amazon-textract-part-2/</guid><description>&lt;p&gt;In the &lt;a href="https://aws.nz/projects/analyse-pdfs-at-scale-with-amazon-textract-part-1/"&gt;&lt;strong&gt;previous post&lt;/strong&gt;&lt;/a&gt;, I described my need to parse many PDF documents in an automated way. We have introduced &lt;a href="https://aws.amazon.com/textract/"&gt;Amazon Textract&lt;/a&gt; — a service that can do that at scale with surprising accuracy. Then we have gone through the architecture and limitations. Today we will deploy the solution, parse some documents and use the results.&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://aws.nz/projects/analyse-pdfs-at-scale-with-amazon-textract-part-2/image-01.jpg"
 alt="Stack of balanced stones by a river"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@arstyy"&gt;Austin Neill&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id="create-the-stack-and-test"&gt;Create the stack and test&lt;/h2&gt;
&lt;p&gt;The complete &lt;a href="https://github.com/mludvig/amazon-textract-cloudformation"&gt;Textract CloudFormation project is available on GitHub&lt;/a&gt;. Follow the instructions there to deploy the stack to one of the regions where Textract is available. For example to &lt;em&gt;us-west-2&lt;/em&gt; (Oregon) which also happens to have the lowest Textract prices.&lt;/p&gt;</description></item><item><title>Analyse PDFs at Scale with Amazon Textract — Part 1</title><link>https://aws.nz/projects/analyse-pdfs-at-scale-with-amazon-textract-part-1/</link><pubDate>Tue, 26 May 2020 10:39:50 +1200</pubDate><guid>https://aws.nz/projects/analyse-pdfs-at-scale-with-amazon-textract-part-1/</guid><description>&lt;figure&gt;&lt;img src="https://aws.nz/projects/analyse-pdfs-at-scale-with-amazon-textract-part-1/image-01.jpg"
 alt="Shop window painted with Pay Your Tax Now Here!"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@nypl"&gt;The New York Public Library&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;It’s a &lt;em&gt;Tax time&lt;/em&gt; again here in New Zealand. When I was putting together the documents for my accountant last week, I wanted to export some account statements from my bank to CSV.&lt;/p&gt;
&lt;p&gt;Surprisingly I realised that it could be done for most of my accounts except for one — the mortgage loan account. The bank helpline confirmed that CSV export is not possible, and the only option is to download the monthly statement PDFs and re-type them to Excel manually. Wait! What? Why? Come on! It works for all my other accounts, why not for the mortgage one?!&lt;/p&gt;</description></item><item><title>CloudFormation Service Roles</title><link>https://aws.nz/best-practice/cloudformation-service-roles/</link><pubDate>Sat, 10 Aug 2019 20:45:33 +1200</pubDate><guid>https://aws.nz/best-practice/cloudformation-service-roles/</guid><description>&lt;p&gt;Sometimes we want to give users the ability to create pretty much anything with CloudFormation but at the same time prevent them from doing the same through the console or aws-cli. Perhaps it’s a company policy that everything must be managed using CloudFormation. Or on the other hand you may have Admin privileges but want to CloudFormation can do on your behalf.&lt;/p&gt;
&lt;p&gt;Solution?&lt;/p&gt;
&lt;h2 id="cloudformation-service-role"&gt;CloudFormation Service Role&lt;/h2&gt;
&lt;p&gt;CFN Service Role can achieve exactly that – users can have a separate set of credentials for work outside of  CloudFormation and a completely different set of credentials for creating, updating and deleting CloudFormation stacks.&lt;/p&gt;</description></item><item><title>ssm-tunnel</title><link>https://aws.nz/projects/ssm-tunnel/</link><pubDate>Sun, 21 Jul 2019 23:22:51 +1200</pubDate><guid>https://aws.nz/projects/ssm-tunnel/</guid><description>&lt;p&gt;EC2 instances, RDS database and many other resources reside in VPCs. To access them we need a network connectivity – either through a VPN, Direct Connect, or through a Jump / Bastion Host. That’s stating the obvious.&lt;/p&gt;
&lt;p&gt;Sometimes, however, it’s inconvenient or difficult to achieve a direct connectivity ad-hoc – maybe you are in a location where your VPN is filtered, or from where the Bastion host Security Group won’t allow access but you still need access to the RDS for example.&lt;/p&gt;</description></item><item><title>SSM Sessions the easy way</title><link>https://aws.nz/projects/ssm-session/</link><pubDate>Mon, 27 May 2019 08:05:08 +1200</pubDate><guid>https://aws.nz/projects/ssm-session/</guid><description>&lt;p&gt;In the previous post – &lt;a href="https://aws.nz/best-practice/ssm-session-manager/"&gt;Using SSM Session Manager for interactive instance access&lt;/a&gt; – I showed you how to access EC2 instances through &lt;strong&gt;AWS Systems Manager (SSM)&lt;/strong&gt; &lt;em&gt;&lt;strong&gt;Sessions&lt;/strong&gt;&lt;/em&gt; without having to open &lt;em&gt;Security Group&lt;/em&gt;s or &lt;em&gt;firewall ports&lt;/em&gt;, maintain &lt;em&gt;SSH keys&lt;/em&gt;, &lt;em&gt;VPNs&lt;/em&gt;, &lt;em&gt;Jump Hosts&lt;/em&gt;, and so on.&lt;/p&gt;
&lt;p&gt;The native way for starting a SSM Session with &lt;code&gt;aws ssm start-session&lt;/code&gt; requires the knowledge of the exact &lt;strong&gt;Instance ID&lt;/strong&gt;, e.g. &lt;code&gt;i-01234567890abcdef&lt;/code&gt;. That’s not very user friendly unfortunately. I know what my “pet” instances &lt;em&gt;Host Names&lt;/em&gt; or &lt;em&gt;Instance Names&lt;/em&gt; are. And I can often see the &lt;em&gt;IP addresses&lt;/em&gt; of a misbehaving auto-scaling instances in the logs. However I don’t always know the corresponding &lt;em&gt;Instance ID&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Using SSM Session Manager for interactive instance access</title><link>https://aws.nz/best-practice/ssm-session-manager/</link><pubDate>Sat, 25 May 2019 00:41:17 +1200</pubDate><guid>https://aws.nz/best-practice/ssm-session-manager/</guid><description>&lt;p&gt;You may argue that interactive login to EC2 instances should never be needed. Everything is dynamic, automated, self healing, centrally logged, and so on and there is no place for human interaction, right? But lets be honest – the world isn’t perfect and we all sometimes need to jump into &lt;em&gt;bash&lt;/em&gt; to do &lt;em&gt;stuff&lt;/em&gt; for one reason or another.&lt;/p&gt;
&lt;p&gt;Traditionally our EC2 instances would have a &lt;strong&gt;SSH KeyPair&lt;/strong&gt; assigned and a &lt;strong&gt;Security Group&lt;/strong&gt; with &lt;strong&gt;SSH port&lt;/strong&gt; open. If they were on private IPs only we would also need a &lt;strong&gt;jump host or VPN&lt;/strong&gt; to access them. That works but it’s got its own problems – for example rotation of the SSH keys, keeping the Security Group up to date, etc.&lt;/p&gt;</description></item><item><title>Amazon Polly: Teach your projects talk</title><link>https://aws.nz/projects/aws-polly-tutorial/</link><pubDate>Fri, 29 Mar 2019 05:30:47 +1300</pubDate><guid>https://aws.nz/projects/aws-polly-tutorial/</guid><description>&lt;figure&gt;&lt;img src="https://aws.nz/projects/aws-polly-tutorial/speaker.jpg"
 alt="White desktop speaker next to a computer monitor"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@ugmonk"&gt;Jeff Sheldon&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;Voice output can take your project to a whole new level. Are you a maker building a new home automation tool or a professional developer working on a commercial gadget? Follow this tutorial to learn how to add a natural voice to your project with very little effort!&lt;/p&gt;
&lt;h2 id="tts--text-to-speech"&gt;TTS = Text To Speech&lt;/h2&gt;
&lt;p&gt;Text To Speech systems are nothing new. The first time I heard a computer speak was sometime in the last century on my Commodore C64. It was a hardly intelligible, monotonic, robotic voice. Yet so exciting!!&lt;/p&gt;</description></item><item><title>AWS Polly — credentials</title><link>https://aws.nz/projects/aws-polly-credentials/</link><pubDate>Wed, 13 Mar 2019 16:37:40 +1300</pubDate><guid>https://aws.nz/projects/aws-polly-credentials/</guid><description>&lt;p&gt;This is a side-story for the &lt;a href="https://aws.nz/projects/aws-polly-tutorial/"&gt;main article about AWS Polly&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;&lt;img src="https://aws.nz/projects/aws-polly-credentials/padlock.jpg"
 alt="Padlock and chain on a gate"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@josenothose"&gt;Jose Fontano&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id="aws-account"&gt;AWS Account&lt;/h2&gt;
&lt;p&gt;Before we can use any AWS services we need an AWS account. If you don’t already have one &lt;a href="https://aws.amazon.com/free"&gt;&lt;em&gt;Create a Free AWS Account&lt;/em&gt;&lt;/a&gt; now. The account creation requires a credit card however as long as you stay within the &lt;em&gt;Free Tier&lt;/em&gt; you won’t be charged anything.&lt;/p&gt;
&lt;h2 id="aws-polly-user"&gt;AWS Polly User&lt;/h2&gt;
&lt;p&gt;Once we have an account open we will need the credentials for our script. Explaining the AWS Security model is well beyond the scope of this article, suffice to say that we’ll create a so called &lt;strong&gt;IAM User&lt;/strong&gt; with an attached &lt;strong&gt;IAM Policy&lt;/strong&gt; that gives it access to the AWS Polly service.&lt;/p&gt;</description></item><item><title>CloudFormation package &amp; deploy</title><link>https://aws.nz/best-practice/cloudformation-package-deploy/</link><pubDate>Wed, 20 Feb 2019 20:51:08 +1300</pubDate><guid>https://aws.nz/best-practice/cloudformation-package-deploy/</guid><description>&lt;blockquote&gt;
&lt;p&gt;Easily deploy complex CloudFormation templates with external resources such as Lambdas or Nested Stacks.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Many CloudFormation templates are completely standalone – one single YAML or JSON file and that’s it. Easy to deploy. However in some cases CFN templates refer to other files, or &lt;em&gt;artifacts&lt;/em&gt;. For example Lambda source or ZIP file, nested CloudFormation Template file, or an API definition for API Gateway may be such “artifacts”. These files have to be available in S3 before we can deploy the main CloudFormation template. &lt;/p&gt;</description></item><item><title>IP-Ranges Updater</title><link>https://aws.nz/projects/ip-ranges-updater/</link><pubDate>Fri, 28 Dec 2018 17:16:18 +1300</pubDate><guid>https://aws.nz/projects/ip-ranges-updater/</guid><description>&lt;p&gt;Back in March I wrote about a command line script &lt;a href="https://aws.nz/projects/filter-ip-ranges/"&gt;filter-ip-ranges&lt;/a&gt; that can parse the Amazon-published &lt;a href="https://ip-ranges.amazonaws.com/ip-ranges.json"&gt;ip-ranges.json&lt;/a&gt; file and look up address ranges by region, service or IP address. That’s handy for the occasional manual use or for creating or updating some whitelists or Security Groups through &lt;a href="https://aws.nz/tags/aws-cli/"&gt;aws-cli&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But running an aws-cli script from &lt;em&gt;cron&lt;/em&gt; on some EC2 instance is &lt;em&gt;so old school&lt;/em&gt;!&lt;/p&gt;
&lt;h3 id="ip-ranges-updater-lambda"&gt;IP-Ranges-Updater Lambda&lt;/h3&gt;
&lt;p&gt;Much better way is to have this functionality in a &lt;em&gt;Lambda function&lt;/em&gt; and let it update your &lt;em&gt;Security Groups&lt;/em&gt; or &lt;em&gt;Route Tables&lt;/em&gt; automatically.&lt;/p&gt;</description></item><item><title>New C5 / M5 / T3 instance disk names</title><link>https://aws.nz/misc/c5-m5-t3-instance-disk-names/</link><pubDate>Tue, 02 Oct 2018 21:07:44 +1300</pubDate><guid>https://aws.nz/misc/c5-m5-t3-instance-disk-names/</guid><description>&lt;p&gt;When we started using the new C5, M5 or T3-class instances (e.g. &lt;em&gt;t3.micro&lt;/em&gt;, &lt;em&gt;m5.large&lt;/em&gt;, &lt;em&gt;m5d.large&lt;/em&gt;, &lt;em&gt;c5.xlarge&lt;/em&gt;, etc) we noticed that the disk device names are no longer the classic &lt;code&gt;/dev/sda1&lt;/code&gt; or &lt;code&gt;/dev/xvda&lt;/code&gt; that we were used to for years.&lt;/p&gt;
&lt;h2 id="tldr"&gt;TL;DR&lt;/h2&gt;
&lt;p&gt;The new root disk name is &lt;code&gt;/dev/nvme0n1&lt;/code&gt; with the partition device names being &lt;code&gt;/dev/nvme0n1p1&lt;/code&gt;, &lt;code&gt;/dev/nvme0n1p2&lt;/code&gt;, etc.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;… just in case you’re lazy to read the whole post 🙂&lt;/em&gt;&lt;/p&gt;
&lt;h3 id="identifying-the-disks"&gt;Identifying the disks&lt;/h3&gt;
&lt;p&gt;Now that the disk names in the OS are no longer the names shown in the web console how do we know which disk is which? That’s even more pressing issue if you launch an M5D instance (e.g. m5d.large) with instance ephemeral disk.&lt;/p&gt;</description></item><item><title>CloudFormation Exports</title><link>https://aws.nz/best-practice/cloudformation-exports/</link><pubDate>Mon, 17 Sep 2018 22:26:01 +1200</pubDate><guid>https://aws.nz/best-practice/cloudformation-exports/</guid><description>&lt;p&gt;If you are a &lt;em&gt;&lt;a href="https://aws.amazon.com/cloudformation/"&gt;CloudFormation&lt;/a&gt;&lt;/em&gt; user you have probably come across a situation where an &lt;em&gt;ID of a resource&lt;/em&gt; created in one stack (e.g. &lt;em&gt;Subnet ID&lt;/em&gt; from VPC-Stack) is needed in another, independent stack, for example to create an EC2 instance in EC2-Stack.&lt;/p&gt;
&lt;p&gt;The traditional approach is to pass &lt;code&gt;Outputs&lt;/code&gt; from one template to &lt;code&gt;Parameters&lt;/code&gt; in another template. However there are a few problems…&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The &lt;em&gt;first problem&lt;/em&gt; with this method is that is that you &lt;em&gt;somehow&lt;/em&gt; have to collect the Outputs from one stack and pass them to the Parameters in another. This can be done either manually or through some scripting like &lt;a href="https://aws.nz/tags/aws-cli/"&gt;AWS-CLI&lt;/a&gt; or &lt;a href="https://www.ansible.com/"&gt;Ansible&lt;/a&gt;, but it’s an extra, mundane work.&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;second problem&lt;/em&gt; is that many stacks need the &lt;em&gt;same set of parameters&lt;/em&gt; – VPC ID, Subnet IDs, perhaps some Security Group IDs, Route53 hosted zone name and ID, etc. The Parameters list can get very long and not very interesting.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There is a better option – CloudFormation Stack Exports&lt;/p&gt;</description></item><item><title>CloudWatch Log Mailer</title><link>https://aws.nz/projects/cloudwatch-log-mailer/</link><pubDate>Sat, 30 Jun 2018 21:34:06 +1200</pubDate><guid>https://aws.nz/projects/cloudwatch-log-mailer/</guid><description>&lt;p&gt;Feeding logs from various AWS services to CloudWatch Logs is a common pattern. From Lambda logs, through ECS Task logs, to Linux /var/log/* messages forwarded by awslogs daemon, they can end up in CloudWatch. How can we monitor them – and get alerted – when something of interest gets logged?&lt;/p&gt;
&lt;p&gt;People often use &lt;a href="https://aws.amazon.com/elasticsearch-service/"&gt;Elastic Search&lt;/a&gt;, &lt;a href="https://www.splunk.com/"&gt;Splunk&lt;/a&gt;, &lt;a href="https://www.graylog.org/"&gt;Graylog&lt;/a&gt; or similar &lt;em&gt;heavy weight&lt;/em&gt; solutions. But do we really need that? Very often all we want is to know when a &lt;em&gt;certain keyword&lt;/em&gt;, e.g. “Error”, appears in the messages. Luckily that’s very easy to do.&lt;/p&gt;</description></item><item><title>filter-ip-ranges</title><link>https://aws.nz/projects/filter-ip-ranges/</link><pubDate>Sat, 31 Mar 2018 19:45:34 +1300</pubDate><guid>https://aws.nz/projects/filter-ip-ranges/</guid><description>&lt;p&gt;Sometimes it’s handy to know what &lt;strong&gt;IP address ranges&lt;/strong&gt; are used in different AWS Regions. You may want to &lt;em&gt;whitelist&lt;/em&gt; access to your region AWS endpoints, or from global &lt;em&gt;CloudFront&lt;/em&gt; location, or set up some special &lt;em&gt;routing rules&lt;/em&gt;, or &lt;em&gt;look up&lt;/em&gt; which region a certain IP belongs to.&lt;/p&gt;
&lt;h3 id="ip-rangesjson--filter-ip-ranges"&gt;ip-ranges.json &amp;amp; filter-ip-ranges&lt;/h3&gt;
&lt;p&gt;AWS publishes &lt;a href="https://ip-ranges.amazonaws.com/ip-ranges.json"&gt;ip-ranges.json&lt;/a&gt; file with all that info. But it’s a huge JSON and not really meant for human consumption. So here I wrote a small parser: &lt;strong&gt;&lt;a href="https://github.com/mludvig/aws-utils/blob/master/filter-ip-ranges"&gt;filter-ip-ranges&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Cross-account access with aws-cli</title><link>https://aws.nz/best-practice/cross-account-access-with-aws-cli/</link><pubDate>Wed, 10 Jan 2018 13:34:27 +1300</pubDate><guid>https://aws.nz/best-practice/cross-account-access-with-aws-cli/</guid><description>&lt;p&gt;In the previous post I explained how to Use Cross-account access through AWS Console. Today I’ll show you how to do the same in the command line using &lt;strong&gt;aws-cli&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="images/CrossAccountAccess-2.png"&gt;&lt;img src="images/CrossAccountAccess-2.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We’ve got &lt;em&gt;Access&lt;/em&gt; and &lt;em&gt;Secret keys&lt;/em&gt; for the &lt;strong&gt;Login account&lt;/strong&gt; and want to use &lt;code&gt;aws-cli&lt;/code&gt; to create and manage resources in the &lt;strong&gt;Dev account&lt;/strong&gt; above.&lt;/p&gt;
&lt;h2 id="configure-aws-nz-login-credentials"&gt;Configure aws-nz-login credentials&lt;/h2&gt;
&lt;p&gt;First step is to configure &lt;code&gt;aws-cli&lt;/code&gt; with credentials for the &lt;em&gt;aws-nz-login account&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>Using Cross-account access (AWS Console)</title><link>https://aws.nz/best-practice/using-cross-account-access-aws-console/</link><pubDate>Sun, 10 Dec 2017 10:45:25 +1300</pubDate><guid>https://aws.nz/best-practice/using-cross-account-access-aws-console/</guid><description>&lt;p&gt;Short post to demonstrate how to use AWS Cross-account access from AWS Console. To re-iterate this is what we what we have set up in our &lt;a href="https://aws.nz/best-practice/cross-account-access/"&gt;previous post&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href="images/CrossAccountAccess-2.png"&gt;&lt;img src="images/CrossAccountAccess-2.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="login-to-the-aws-nz-login-account"&gt;Login to the aws-nz-login account&lt;/h2&gt;
&lt;p&gt;First step is to login to the &lt;em&gt;aws-nz-login account&lt;/em&gt; as an non-privileged IAM user, e.g. as michael.ludvig in my case.&lt;/p&gt;
&lt;h2 id="select-switch-role"&gt;Select Switch Role&lt;/h2&gt;
&lt;p&gt;In the top-right menu under your IAM username select &lt;strong&gt;Switch Role&lt;/strong&gt; link.&lt;br&gt;
&lt;a href="images/Selection_028-1.png"&gt;&lt;img src="images/Selection_028-1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="dev-account-role-details"&gt;Dev account Role details&lt;/h2&gt;
&lt;p&gt;Fill in the Dev account name and Role&lt;br&gt;
&lt;a href="images/Selection_029.png"&gt;&lt;img src="images/Selection_029.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Cross-account access</title><link>https://aws.nz/best-practice/cross-account-access/</link><pubDate>Wed, 06 Dec 2017 14:50:01 +1300</pubDate><guid>https://aws.nz/best-practice/cross-account-access/</guid><description>&lt;p&gt;In bigger organisations it is common to have one central AWS account with IAM User accounts and a whole lot of independent per-project or per-team accounts that are only through cross-account access from this central account.&lt;/p&gt;
&lt;p&gt;&lt;a href="images/CrossAccountAccess.png"&gt;&lt;img src="images/CrossAccountAccess.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The benefits is obvious – company has a single place where they manage user accounts, credentials, passwords, permissions, etc. It is a very similar concept to switching from local Linux accounts to a centralised LDAP or AD authentication.&lt;/p&gt;</description></item><item><title>Linux user authentication with SSSD / LDAP</title><link>https://aws.nz/best-practice/sssd-ldap/</link><pubDate>Tue, 17 Oct 2017 19:42:16 +1300</pubDate><guid>https://aws.nz/best-practice/sssd-ldap/</guid><description>&lt;p&gt;Current Linux distributions can seamlessly work as members of Active Directory domains which gives them access to the AD authentication system. However it requires the Linux hosts to “join” the AD domain, for which one has to posses some special AD privileges. In many cases this is not viable and we may only want a simple user authentication without any write privileges to the Active Directory. Good old LDAP provides such an option.&lt;/p&gt;</description></item><item><title>Let’s Encrypt certbot-auto problems on Amazon Linux</title><link>https://aws.nz/best-practice/letsencrypt-amazon-linux/</link><pubDate>Sun, 08 Oct 2017 14:37:03 +1300</pubDate><guid>https://aws.nz/best-practice/letsencrypt-amazon-linux/</guid><description>&lt;p&gt;&lt;a href="https://letsencrypt.org/"&gt;Let’s Encrypt&lt;/a&gt; &lt;code&gt;certbot-auto&lt;/code&gt; support for Amazon Linux is still marked as experimental and as such we occasionally encounter unexpected problems. The most recent one was introduced with certbot-auto 0.19.0. During install or upgrade from previous versions you may get an error like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Upgrading certbot-auto 0.18.2 to 0.19.0...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Replacing certbot-auto...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Creating virtual environment...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Installing Python packages...
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Installation succeeded.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Traceback (most recent call last):
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; File &amp;#34;/opt/eff.org/certbot/venv/bin/letsencrypt&amp;#34;, line 7, in
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It took me quite a while to figure out that it’s got nothing to do with Zope.&lt;/p&gt;</description></item><item><title>Using AWS Storage Gateway Virtual Tape Library in Linux</title><link>https://aws.nz/best-practice/sgw-vtl/</link><pubDate>Wed, 20 Sep 2017 17:31:49 +1200</pubDate><guid>https://aws.nz/best-practice/sgw-vtl/</guid><description>&lt;p&gt;If you are of around my age or younger you probably didn’t have much exposure to tape backup technologies. Tapes are sooo 90’s right?! I definitely didn’t expect that as an AWS Consultant I will have to learn about tapes. But I did! One of our customers wanted to use &lt;strong&gt;AWS Storage Gateway (SGW)&lt;/strong&gt; in the &lt;strong&gt;Virtual Tape Library (VTL)&lt;/strong&gt; mode and use it for backups with Veeam Backup suite. Veeam seems to “just work” with SGW VTL but I like to understand how things work under the hood so I decided to backup my Linux test system to VTL using just the low level Linux tools. That’s the best way to learn.&lt;/p&gt;</description></item><item><title>Monitoring temperature with Raspberry Pi and AWS IoT</title><link>https://aws.nz/projects/aws-iot-part-1/</link><pubDate>Tue, 25 Jul 2017 23:48:27 +1200</pubDate><guid>https://aws.nz/projects/aws-iot-part-1/</guid><description>&lt;p&gt;Working as a Senior AWS Consultant for one of the New Zealand’s leading AWS consulting providers means that I’m expected to have a hands on experience with as many AWS services as possible. In this series I will walk you through my first project that makes use of AWS IoT service.&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2 id="background"&gt;Background&lt;/h2&gt;
&lt;p&gt;In one of our offices we’ve got a small server room with a handful of old servers – mostly sandpit stuff, nothing mission critical. The rack is cooled by an old unreliable Air Conditioning unit that sometimes stops cooling and sometimes even leaks water. Not good but not painful enough to warrant an installation of a new commercial grade cooling.&lt;/p&gt;</description></item><item><title>Joining a Linux EC2 instance to Active Directory realm</title><link>https://aws.nz/best-practice/ad-join/</link><pubDate>Tue, 06 Jun 2017 15:34:38 +1200</pubDate><guid>https://aws.nz/best-practice/ad-join/</guid><description>&lt;p&gt;This post is not too AWS-specific, in fact the steps below should work not only on Amazon Linux but also on RedHat Linux, CentOS and Oracle Linux and posibly on Debian and Ubuntu based distros as well.&lt;/p&gt;
&lt;p&gt;There is a number of prerequisities for a successful completion of this task.&lt;/p&gt;
&lt;h4 id="ec2-instance-must-be-able-to-look-up-active-directory-related-dns-records"&gt;&lt;a href="https://aws.nz/#4cd3cf988e5bbfdc2"&gt;EC2 instance must be able to look up Active Directory related DNS records.&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;At least the following records should be resolvable:&lt;/p&gt;</description></item><item><title>S3 Pre-signed URL example</title><link>https://aws.nz/best-practice/s3-presigned-url/</link><pubDate>Wed, 25 Jan 2017 19:13:17 +1300</pubDate><guid>https://aws.nz/best-practice/s3-presigned-url/</guid><description>&lt;p&gt;S3 pre-signed URLs can be used to provide temporary third-party access to private objects in S3 buckets. For example, non-public files on a file sharing site can be made available to approved users with one-off URLs that expire after 10 minutes. Here we offer a simple demo for testing the concept.&lt;/p&gt;
&lt;p&gt;The demo consists of these parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An S3 bucket with a private access policy, i.e. non-public.&lt;/li&gt;
&lt;li&gt;An EC2 instance with an IAM role attached.&lt;/li&gt;
&lt;li&gt;An IAM policy that gives the EC2 instance access to the S3 bucket through its role.&lt;/li&gt;
&lt;li&gt;Some files, images, etc. uploaded to the S3 bucket.&lt;/li&gt;
&lt;li&gt;A simple PHP script running on the EC2 instance that lists the objects in the bucket and generates signed URLs.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="preparation"&gt;Preparation&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Spin up an &lt;em&gt;Amazon Linux&lt;/em&gt; EC2 instance.&lt;/p&gt;</description></item><item><title>Re-using EC2 SSH Key Pair in multiple AWS regions</title><link>https://aws.nz/best-practice/re-using-ec2-key-pair/</link><pubDate>Mon, 04 Jul 2016 17:33:14 +1200</pubDate><guid>https://aws.nz/best-practice/re-using-ec2-key-pair/</guid><description>&lt;figure&gt;&lt;img src="https://aws.nz/best-practice/re-using-ec2-key-pair/image-01.jpg"
 alt="Pile of old metal keys"&gt;&lt;figcaption&gt;
 &lt;p&gt;Photo by &lt;a href="https://unsplash.com/@contradirony"&gt;Samantha Lam&lt;/a&gt; on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
 &lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;One of the parameters required for launching an EC2 instance is a &lt;em&gt;Key Pair&lt;/em&gt; which is effectively an &lt;em&gt;SSH Key&lt;/em&gt; used for interactive logging into the default user account — on Amazon Linux it’s the &lt;em&gt;ec2-user&lt;/em&gt; account — or for decrypting the Windows Administrator’s password.&lt;/p&gt;
&lt;p&gt;It is easy to create a new &lt;em&gt;Key Pair / SSH Key&lt;/em&gt; as part of the EC2 launch process however as soon as you start using more regions and more accounts you will quickly end up with heaps of different Keys and unless you are diligent with their naming both on the filesystem and in AWS you will end up with a mess. Like I used to.&lt;/p&gt;</description></item><item><title>Using LastPass with AWS Console</title><link>https://aws.nz/best-practice/lastpass/</link><pubDate>Sun, 17 Jan 2016 01:02:56 +1300</pubDate><guid>https://aws.nz/best-practice/lastpass/</guid><description>&lt;p&gt;As an Amazon Web Services professional working on projects for multiple customers I need an easy way to login to their many AWS accounts through the web console.&lt;/p&gt;
&lt;p&gt;Since I use LastPass for storing my website passwords it’s only logical to use it for AWS logins as well. The problem is that there are 3 login fields – Account, User Name and Password – instead of the usual 2. LastPass has support for filling the additional field however it may not be entirely obvious. Follow these steps…&lt;/p&gt;</description></item><item><title>EC2 Instance Roles</title><link>https://aws.nz/best-practice/ec2-instance-roles/</link><pubDate>Fri, 27 Nov 2015 13:15:39 +1300</pubDate><guid>https://aws.nz/best-practice/ec2-instance-roles/</guid><description>&lt;p&gt;In the previous post about &lt;a href="https://aws.nz/best-practice/access-secret-keys/"&gt;Access &amp;amp; Secret Keys&lt;/a&gt; I emphasized that those keys – static keys – should &lt;em&gt;never&lt;/em&gt; be used in production and in fact they should never leave your laptop. But what if you need to call the AWS services from scripts or programs running on an EC2 instance?&lt;/p&gt;
&lt;p&gt;In a typical scenario such a script is called either by a scheduler (cron) or by another program like CI/CD tool (Jenkins) to automatically perform a task that needs certain AWS privileges. Say it has to upload a newly build package to an S3 bucket at the final stage of Jenkins run or it shut down all non-production EC2 instances in the evening and restart them in the morning.&lt;br&gt;
The answer is – assign IAM Role to the EC2 Instance&lt;/p&gt;</description></item><item><title>Michael Ludvig</title><link>https://aws.nz/michael-ludvig/</link><pubDate>Mon, 23 Nov 2015 01:17:26 +1300</pubDate><guid>https://aws.nz/michael-ludvig/</guid><description>&lt;p&gt;&lt;img src="images/michal-e1448165579820.jpg" alt="Michael Ludvig"&gt;&lt;/p&gt;
&lt;h2 id="who-am-i"&gt;Who am I?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Michael Ludvig&lt;/strong&gt; — Experienced IT Professional focused on Architecting, Designing and Implementation of Amazon Web Services solutions for customers of various sized and various AWS adoption levels.&lt;/p&gt;
&lt;p&gt;My background in &lt;em&gt;all things Linux&lt;/em&gt; with over 15 years of professional experience from Linux Kernel development through System, Security and Network Administration to a more high level role of Design and Delivery of new projects makes a perfect foundation for the varied and complex skill set required for successful Amazon Web Services adoption.&lt;/p&gt;</description></item><item><title>Access &amp; Secret Keys</title><link>https://aws.nz/best-practice/access-secret-keys/</link><pubDate>Wed, 22 Jul 2015 00:14:16 +1200</pubDate><guid>https://aws.nz/best-practice/access-secret-keys/</guid><description>&lt;p&gt;&lt;img src="images/iam.png" alt="IAM"&gt;When working with AWS API the clients (programs, scripts, etc) must have a way to prove who they are and what level of access to Amazon services they should have.&lt;/p&gt;
&lt;p&gt;In a typical scenario an AWS user runs &lt;a href="https://aws.amazon.com/cli/"&gt;aws cli&lt;/a&gt; (or a script using &lt;em&gt;aws cli&lt;/em&gt;) to interact with Amazon. For example to create a VPC and Subnets or to backup some files to S3 bucket. To perform any non-anonymous operation like these the script will need a set of &lt;strong&gt;AWS Credentials&lt;/strong&gt; – also known as &lt;em&gt;Access Key&lt;/em&gt; and &lt;em&gt;Secret Key&lt;/em&gt;.&lt;/p&gt;</description></item></channel></rss>