<feed xmlns="http://www.w3.org/2005/Atom"> <id>https://til.juliusgamanyi.com/</id><title>Julius Gamanyi</title><subtitle>Julius Gamanyi's TILs.</subtitle> <updated>2024-09-20T11:33:33+02:00</updated> <author> <name>Julius Gamanyi</name> <uri>https://til.juliusgamanyi.com/</uri> </author><link rel="self" type="application/atom+xml" href="https://til.juliusgamanyi.com/feed.xml"/><link rel="alternate" type="text/html" hreflang="en" href="https://til.juliusgamanyi.com/"/> <generator uri="https://jekyllrb.com/" version="4.3.3">Jekyll</generator> <rights> © 2024 Julius Gamanyi </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>AWS - EC2 with UserData</title><link href="https://til.juliusgamanyi.com/posts/aws-ec2-with-userdata/" rel="alternate" type="text/html" title="AWS - EC2 with UserData" /><published>2024-09-18T20:15:00+02:00</published> <updated>2024-09-18T20:15:00+02:00</updated> <id>https://til.juliusgamanyi.com/posts/aws-ec2-with-userdata/</id> <content src="https://til.juliusgamanyi.com/posts/aws-ec2-with-userdata/" /> <author> <name>julius</name> </author> <summary>This is more of a list of questions that come up when working with EC2s and UserData scripts. What UserData did the EC2 instance run at startup? aws ec2 describe-instance-attribute --instance-id i-0fe45e27d4b6f1cc3 --attribute userData | jq -r &amp;#39;.UserData.Value&amp;#39; | base64 -d What’s the size in bytes of UserData? Why check for the size of UserData? I’d like to pass UserData as a Parameter in...</summary> </entry> <entry><title>Powershell - check local admin user is enabled</title><link href="https://til.juliusgamanyi.com/posts/powershell-check-local-admin-user-is-enabled/" rel="alternate" type="text/html" title="Powershell - check local admin user is enabled" /><published>2024-05-30T09:15:00+02:00</published> <updated>2024-05-30T09:15:00+02:00</updated> <id>https://til.juliusgamanyi.com/posts/powershell-check-local-admin-user-is-enabled/</id> <content src="https://til.juliusgamanyi.com/posts/powershell-check-local-admin-user-is-enabled/" /> <author> <name>julius</name> </author> <summary>Aim: check if local admin user on Windows is enabled using PowerShell. It’s better to use the SID for the local administrator account instead of the hard-coded English name, Administrator, because the differs according to language. # get details PS C:\tmp&amp;amp;gt; $AdminDetails = (Get-LocalUser | ? { $_.SID -like &amp;#39;S-1-5-21-*-500&amp;#39;}) # print details PS C:\tmp&amp;amp;gt; $AdminDetails # output looks like ...</summary> </entry> <entry><title>AWS S3 - Create folder or prefix if not exists</title><link href="https://til.juliusgamanyi.com/posts/aws-s3-check-folder-exists/" rel="alternate" type="text/html" title="AWS S3 - Create folder or prefix if not exists" /><published>2024-05-30T09:15:00+02:00</published> <updated>2024-05-30T09:15:00+02:00</updated> <id>https://til.juliusgamanyi.com/posts/aws-s3-check-folder-exists/</id> <content src="https://til.juliusgamanyi.com/posts/aws-s3-check-folder-exists/" /> <author> <name>julius</name> </author> <summary>I’d like to create a top-level directory in S3 if that directory doesn’t exist. Since S3 deals with objects, the concept of a directory is mapped to S3’s concept of prefix. The AWS S3 Cli call returns a json response containing the key Contents if the prefix (aka folder) exists. Because the response is json, I rely on jq to check if the result contains the Contents key. S3_BUCKET_NAME=&amp;quot;mys3b...</summary> </entry> <entry><title>AWS SSM - Send commands to run on remote Windows EC2 Instance</title><link href="https://til.juliusgamanyi.com/posts/aws-ssm-send-commands-to-run-on-remote-windows-ec2/" rel="alternate" type="text/html" title="AWS SSM - Send commands to run on remote Windows EC2 Instance" /><published>2024-03-23T10:35:00+01:00</published> <updated>2024-03-23T10:35:00+01:00</updated> <id>https://til.juliusgamanyi.com/posts/aws-ssm-send-commands-to-run-on-remote-windows-ec2/</id> <content src="https://til.juliusgamanyi.com/posts/aws-ssm-send-commands-to-run-on-remote-windows-ec2/" /> <author> <name>julius</name> </author> <summary>Aim Recently, I wanted to execute commands from my local machine (even a CI machine) on a remote Windows EC2 instance. In other words, send a bunch of commands that get executed on a remote EC2 instance. And get back the status of the execution and the its output. This relies on the RunCommand feature of AWS Session Manager. Prerequisites A few prerequisites are: EC2 instance is running ...</summary> </entry> <entry><title>GitHub Actions - Packer error NoCredentialProviders</title><link href="https://til.juliusgamanyi.com/posts/gh-action-packer-error-nocredentialprovider/" rel="alternate" type="text/html" title="GitHub Actions - Packer error NoCredentialProviders" /><published>2024-02-18T19:15:00+01:00</published> <updated>2024-02-18T19:15:00+01:00</updated> <id>https://til.juliusgamanyi.com/posts/gh-action-packer-error-nocredentialprovider/</id> <content src="https://til.juliusgamanyi.com/posts/gh-action-packer-error-nocredentialprovider/" /> <author> <name>julius</name> </author> <summary>Problem: Packer shows aws.Config.CredentialsChainVerboseErrors When running Packer within GitHub Actions, I saw this error: ==&amp;amp;gt; amazon-ebs.ami_name: Stopping the source instance... amazon-ebs.ami_name: Stopping instance ==&amp;amp;gt; amazon-ebs.ami_name: For verbose messaging see aws.Config.CredentialsChainVerboseErrors ==&amp;amp;gt; amazon-ebs.ami_name: Error stopping instance: NoCredentialProvide...</summary> </entry> </feed>
