<?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>Tue, 06 Sep 2022 14:47:07 +1200</lastBuildDate><atom:link href="https://aws.nz/index.xml" rel="self" type="application/rss+xml"/><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>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://michael-ludvig.medium.com/mining-bitcoin-and-other-crypto-on-aws-eb172940059f"&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>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>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" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Upgrading certbot-auto 0.18.2 to 0.19.0...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Replacing certbot-auto...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Creating virtual environment...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Installing Python packages...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Installation succeeded.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Traceback (most recent call last):
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&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 a temporary 3rd party access to private objects in S3 buckets. For example non-public files on a file sharing site can only be made available to the 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 a number of parts:&lt;/p&gt;
&lt;h2 id="s3-bucket-with-a-private-access-policy-ie-non-public"&gt;S3 bucket with a Private access policy, i.e. non-public&lt;/h2&gt;
&lt;h2 id="ec2-instance-with-iam-role-attached"&gt;EC2 instance with IAM Role attached&lt;/h2&gt;
&lt;h2 id="iam-policy-that-gives-the-ec2-instance-access-to-the-s3-bucket-through-the-iam-role"&gt;IAM Policy that gives the EC2 instance access to the S3 Bucket through the IAM Role&lt;/h2&gt;
&lt;h2 id="some-files-images-etc-uploaded-to-the-s3-bucket"&gt;Some files, images, etc uploaded to the S3 bucket&lt;/h2&gt;
&lt;h2 id="simple-php-script-running-on-the-ec2-instance-that-lists-the-objects-files-in-the-bucket-and-generates-signed-urls"&gt;Simple PHP Script running on the EC2 instance that lists the objects (files) in the bucket and generates signed URLs&lt;/h2&gt;
&lt;h3 id="preparation"&gt;Preparation&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Spin up &lt;em&gt;Amazon Linux&lt;/em&gt; EC2 instance&lt;/p&gt;</description></item><item><title>Re-using EC2 Key Pair in multiple 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;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 ec-user 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 stored SSH Keys and unless you are diligent with their naming both on the filesystem an in AWS you’ll end up with a mess. Like I did.&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="Michal 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>