How many services does AWS actually have?

Ladies and gentlemen, I’m here to ask and answer one simple question:
Do you know how many services Amazon Web Services currently offers?

After the last re:Invent there’s probably around 200. But the exact exact number? No idea.

Why is it so? Because there isn’t a single source of truth we can consult. Sure there are sources of truths but can they all be trusted? And what do I mean by sources, plural?

Let’s consider the places were we can see the most up-to-date service listing. No, it is not your screenshot of that re:Invent video nor some other guy’s GitHub page with a “complete list ™”.

It is a living list. It evolves and changes. And gives us all headaches and nightmares in the process. The fact that AWS doesn’t retire services does little to ease the pain.

So how do we get the ultimate and final list of all the services in this life and death!?” I hear you yell in desperation. Fear not, for we will go through multiple ways of obtaining the same (but different) lists of AWS services.

Continue Reading

Do you need the list of available instance types in a particular AWS Region?

I did today. Well, someone else did but I thought I could help them with the issue. So I cobbled something together today and it seems to be working fine.

Generally, the idea is to use Get-PLSProduct cmdlet. What it does is “Calls the AWS Price List Service GetProducts API operation”. Then we can parse it and see which instances can be launched in a particular AWS region. Nice, right? 🙂

Continue Reading

Automate creation of Performance Monitor Data Collector on an EC2 instance or a WorkSpace

Do you sometimes notice high CPU or memory usage on your EC2 instances or WorkSpaces? Do you know what’s causing it? For how long and how frequently?

It’s easy to find a rogue process in Task Manager and stop it, but is it a part of the pattern?

Enter a century-old tool -> Performance Monitor.

Sometimes, the rogue process is an application or a service which spikes at random times for random intervals. In such cases, we need to set up a Data Collector in the Performance Monitor and use it to track resource usage over a period of time. Logs are then replayed and root cause identified.

Continue Reading

OpsWorks for Puppet Enterprise IAM role for nodes

“To allow your Puppet nodes to connect to your server, you have to create an AWS Identity and Access Management (IAM) role to use as your EC2 instance profile.”
That’s what the Puppet Enterprise Starter Kit manual says.

Step 1 of the guide says: “Here’s the policy. Create IAM role to use it. For information about how to create an IAM role, see our docs.”

I think we can do better than that. And automate it.

Continue Reading

Colors! Magical colors!

PowerShell with colors! <3

When you don’t need to pass the stuff around and down the pipeline, Write-Host is an awesome command. It has all the shiny colors! ^_^

The question I was asked yesterday was: How do I see all PowerShell color combinations?

As it turns out, it’s very simple 🙂

Continue Reading

How to get my EC2 instance password?

I have issues with default EC2 passwords for Windows Server 2016.

Don’t get me wrong, I like that they are 32-character ones. But they are not my 32-character ones. These are really random which makes it pointless to try and type.

Now, if you were like me and actually care about security, your passwords are also long but they make sense. Like “IreallyREALLYlikeUNICORNS!BUTonlyPINKones#”.

Awesome password, am I right? *high five*

So we need a nice way to grab the default admin password. And yet again, let’s keep away from the AWS console. I did say “a nice way”, after all.

How to get my EC2 instance password?

Continue Reading

Get OS of the instance. Or, Gods forbid, SQL version…

I’ve thought about this long and hard. More ‘longer’ than ‘harder’, but still 🙂

The conclusion was that the blog won’t have much sense if I keep updating it once every few months. So I’ll minimize, or completely drop, the teaching tone from my posts.

Time taken to dissect every line of code isn’t worth it, really. If you’d like to go deeper into something that interests you, drop me a line and we can have a chat about it. Much better use of time than laying it all out initially… for nobody to read 🙂

So there you have it. This is about to become a soulless code dump place… But at least I’ve created a GitHub account! Yay! 🙂

First thing on the menu is my today’s puzzle. “How to find out which of my instances are running Windows and which run Linux?”

Continue Reading