Per the following AWS URL, the following command will disable the AWS Instance Metadata Service:
aws ec2 modify-instance-metadata-options –instance-id <instance-id> –http-endpoint disabled
This means that HTTP queries to endpoint 169.254.169.254 will be disabled from your AWS instance.