Giter Site home page Giter Site logo

aws-imds-defaults's Introduction

aws-imds-defaults

This is a simple utility to set the EC2 Instance Metadata Service default settings for an account across all active regions.

On March 25, 2024, AWS announced that users can now configure defaults for the Instance Metadata Service at the account level. Normally, this would involve going into the EC2 console for each region and manually changing the settings, or running the modify-instance-metadata-defaults CLI command for each region that was introduced in version 2.15.33 of the AWS CLI.

This script aims to automate that process. It makes use of your AWS credentials that are passed to boto3 to authenticate to an account and then issue the command to change the default metadata settings in each region in that account.

By default, the script will only change two defaults:

  1. It will change the Metadata version to **V2 only (token required)
  2. It will change the Metadata response hop limit to 2

You can override either value by passing in the parameter and the desired value to the set_metadata_defaults function. You can also set values for the Instance Metadata Service setting (which enables or disables the IMDS endpoint by default) and the Access to tags in Metadata. For more information on these settings, reference the Boto3 documentation for modify_instance_metadata_defaults.

Pre-Requisites

  1. Your Boto3 version must be 1.34.70 or later, which added support for ModifyInstanceMetadataDefaults.

aws-imds-defaults's People

Contributors

misczak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.