Skip to content
Retrieving metadata from a EC2 bootstrapped instance - Hands-on
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Retrieving metadata from a EC2 bootstrapped instance - Hands-on

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

I'm currently preparing AWS Certified Solution Architect - Associate certificate.
In the following gist you'll learn how to automate the deployment of an EC2 instance on AWS and retrieve the instance metadata. The hand-on will consist on a simple web server deployment using Amazon Elastic Compute Cloud and you'll learn how to access its metadata from the AWSCLI.
I performed this setup on my Ubuntu 18.04.2 LTS.
To check your OS version, execute $ lsb_release -a in your Terminal.


None. Just log into your AWS management console,
You'll need to perform several tasks in your CLI regarding SSH keygen, so make sure you check the following prerequisites.


First, make sure Oracle jdk is installed. I recommend java 1.8.0
To uninstall effectively your current jdk, perform this:
$ sudo apt-get remove openjdk*
$ sudo apt-get remove --auto-remove openjdk*
$ sudo apt-get purge openjdk*
$ sudo apt-get purge --auto-remove openjdk*

To install java 1.8.0, open Terminal Ctrl+Alt+T and run the command:
$ sudo add-apt-repository ppa:webupd8team/java // adds PPA repository
$ sudo apt-get update // updates package list
$ sudo apt-get install openjdk-8-jdk // installs openjdk

$ javac -version // shows your new java version


  • Isaac Arnault - AWS Cloud series - Related tags: #EC2 #Metadata #AWSCLI #Linux
You can’t perform that action at this time.