Thursday, May 18, 2023

How to get metadata details for AWS EC2 instance using curl command

 Get metadata details for AWS EC2 instance using curl command 


[root@]# curl http://169.254.169.254/2018-09-24/meta-data

ami-id

ami-launch-index

ami-manifest-path

block-device-mapping/

events/

hibernation/

hostname

identity-credentials/

instance-action

instance-id

instance-type

local-hostname

local-ipv4

mac

metrics/

network/

placement/

profile

public-hostname

public-ipv4

public-keys/

reservation-id

security-groups

services



Example: 

[root@]# curl http://169.254.169.254/2018-09-24/meta-data/security-groups

kpitdb-demo-db-sg

No comments:

Post a Comment