This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |