Skip to content

Instantly share code, notes, and snippets.

@ITProKyle
Last active April 15, 2020 16:17
Show Gist options
  • Save ITProKyle/de4a8433d89d0752a4c99598a3f90fc4 to your computer and use it in GitHub Desktop.
Save ITProKyle/de4a8433d89d0752a4c99598a3f90fc4 to your computer and use it in GitHub Desktop.
Exporting and Importing AWS Console Navigation Bar Configuration

Exporting and Importing AWS Console Navigation Bar Configurations

The code snippets contained below are intended to be used as a bookmarklet. In your browser of choice, save the snippets as a bookmark then click one with the AWS Console open.

Table of Contents

Exporting a Configured Navigation Bar

Running the below bookmarklet with open a dialog box with the short name representation of all the shortcuts that have been added to the navbar. They will also be in the appropriate order. These short names will be used when importing/restoring a navbar.

javascript:alert(JSON.parse(decodeURIComponent(document.cookie.replace(/(?:(?:^|.*;\s*)noflush_awscnm\s*\=\s*([^;]*).*$)|^.*$/, "$1"))).sc.join(","));void(0);

Importing a Navigation Bar Configuration

Running the below bookmarklet will modify the AWS Console cookie to inject your desited navbar. The snippen below will configure a navbar with al,lam,ec2. Simply replace this section of the snippet with your desired configuration.

javascript:var c=document.cookie.replace(/(?:(?:^|.*;\s*)noflush_awscnm\s*\=\s*([^;]*).*$)|^.*$/, "$1"); if (!c) { alert("Can't find cookie. Wrong domain?"); } else { var awscnm=JSON.parse(decodeURIComponent(c)); awscnm.sc = "ag,lam,ec2".split(","); document.cookie = `noflush_awscnm=${encodeURIComponent(JSON.stringify(awscnm))};domain=.console.aws.amazon.com;path=/`; alert(`Restored: ${awscnm.sc}`);} void(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment