-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaws
More file actions
executable file
·52 lines (20 loc) · 1.39 KB
/
aws
File metadata and controls
executable file
·52 lines (20 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
curl http://169.254.169.254/latest/dynamic/instance-identity/document
cloudformation
To view the log file, type the command below in your instance terminal.
cat /var/log/cloud-init-output.log
Explore the log file to see the log entries generated for installing the user data script.
To view the instance metadata, type the command below:
curl http://169.254.169.254/latest/meta-data/
Execute the command below to get the instance identity document of your instance:
curl http://169.254.169.254/latest/dynamic/instance-identity/document
Execute the command below to get the instance public IP address:
curl http://169.254.169.254/latest/meta-data/public-ipv4
Execute the command below to get the MAC address of the instance:
curl http://169.254.169.254/latest/meta-data/mac
Execute the command below to get the VPC ID in which the instance resides. Make sure to replace Your-MAC in the command below with the MAC address of your instance:
curl http://169.254.169.254/latest/meta-data/network/interfaces/macs/Your-MAC/vpc-id
Execute the command below to get the subnet-id in which the instance resides. Make sure to replace Your-MAC in the command below with the MAC address of your instance:
curl http://169.254.169.254/latest/meta-data/network/interfaces/macs/Your-MAC/subnet-id
Execute the command below to get the instance user data:
curl http://169.254.169.254/latest/user-data
boto3