Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Scovell MichaelScovell

View GitHub Profile
View restore-metadata.sh
#!/bin/bash
# Script that will restore the metadata for the given instance.
#Create variable for instance ID
instanceID=$1
#Check to ensure that the instance is not blank
if [[ -n $instanceID ]];
then
#Restore Metadata
View disable-ec2-imds.sh
#!/bin/bash
# Script that will disable the metadata for the given instance.
#Create variable for instance ID
instanceID=$1
#Check to ensure that the instance is not blank
if [[ -n $instanceID ]];
then
#Remove EC2 IMDS
View modify-ec2-imdsv2.sh
#!/bin/bash
#Script that will configure existing EC2 instances to IMDSV2
#Create variable for instance ID
instanceID=$1
#Check to ensure that the instance is not blank
if [[ -n $instanceID ]];
then
#Add IMDSV2