AWS - EC2 with UserData
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 ...
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 ...
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...
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 re...
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 in...
Problem: Packer shows aws.Config.CredentialsChainVerboseErrors When running Packer within GitHub Actions, I saw this error: ==> amazon-ebs.ami_name: Stopping the source instance... amazon-...
Aim: build python code that pulls packages from a custom pypy (Python Package Index). And pushes own packages to that private index. Add to git repo In the git repo, add the following: Add th...
When downloading files in PowerShell, using .NET’s WebClient is way faster than using Invoke-WebRequest. Recently, downloading a 1.5GB file using Invoke-WebRequest took about 20 minutes. For the s...
Set list in a GitHub Actions workflow. And pass it to bash for processing. name: my workflow on: workflow_dispatch: . . . jobs: jobA: # . . . steps: - name: Print Lis...
Save curl httpcode and response in variables for further processing. Found via https://unix.stackexchange.com/a/572434 #!/bin/bash URL="https://example.com" response=$(curl --silent --write-out ...
I often call curl in a bash script. How do I pass variables that I’ve set in bash as arguments to curl’s command line option, say --data? Below is an example without variables. curl \ --header ...