-
Notifications
You must be signed in to change notification settings - Fork 0
/
All Commands and IAM Policy JSON - AWS VPC Design, Networking and EC2 Administration.txt
143 lines (85 loc) · 9.07 KB
/
All Commands and IAM Policy JSON - AWS VPC Design, Networking and EC2 Administration.txt
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
LINE COMMANDS & EICE IAM POLICY JSON
Section 11 - STUDENT HANDS-ON LAB: Create EC2 Instances
---->> Complete the tasks in Section 11 of the detailed instructions twice.
---->> Create one EC2 Instance on a Public Subnet and another on a Private Subnet
---->> Click the link below to view those instructions
https://chameleonmetadata.com/Education/VPC-Setup/images/AWS-VPC-Setup-Final-MindMap.html
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Section 11: Demonstration - STUDENT HANDS-ON LAB: Connect to EC2 Using EC2 Dashboard & EC2 Instance Connect
---->> Visit the EC2 Dashboard (Enter "EC2" in the search box to get to the EC2 Dashboard) and attempt to connect.
---->> Connection Type: Select Connect using EC2 Instance Connect
---->> After you successfully connect and see a LINUX prompt from the EC2 Instance, execute this command:
curl checkip.amazonaws.com
---->> Try this with an EC2 Instance on a Public Subnet. Then, try to connect to an EC2 Instance on a Private Subnet
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Section 12 - STUDENT HANDS-ON LAB: Create an EC2 Instance Connect Endpoint
---->> Complete the tasks in Section 12 of the detailed instructions twice. Those instructions may be found at the link below.
https://chameleonmetadata.com/Education/VPC-Setup/images/AWS-VPC-Setup-Final-MindMap.html
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Section 12: Demonstration - STUDENT HANDS-ON LAB: Connect to EC2 Using EC2 Dashboard & EC2 Instance Connect Endpoint
---->> Visit the EC2 Dashboard and attempt to connect to an EC2 Instance in a Private Subnet.
---->> Connection Type: Select Connect using EC2 Instance Connect Endpoint (There are no hyphens in this command)
curl checkip.amazonaws.com
---->> Notice the IP address is the Elastic IPs created during Step 6
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Section 13 - STUDENT HANDS-ON LAB: Create IAM Policy for EC2 Instance Connect Endpoint (EICE)
---->> Complete the tasks in Section 13 of the detailed instructions found at the link below
https://chameleonmetadata.com/Education/VPC-Setup/images/AWS-VPC-Setup-Final-MindMap.html
---->> Click the link below to view a JSON template for configuring the "IAM Policy For EICE"
https://github.com/chameleonmetadata/VPC-with-EICE-Endpoint/blob/main/IAM_Policy_for_EICE_Endpoint.json#IAM_Policy_for_EICE_Endpoint
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Section 14 - STUDENT HANDS-ON LAB: Create IAM Role & Attach IAM Policy for EC2 Instance Connect Endpoint (EICE)
---->> Complete the tasks in Section 14 of the detailed instructions found at the link below
https://chameleonmetadata.com/Education/VPC-Setup/images/AWS-VPC-Setup-Final-MindMap.html
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Section 14: Demonstration - STUDENT HANDS-ON LAB: Create IAM Access Key for AWS CLI
---->> Complete the tasks in Section 15 of the detailed instructions found at the link below
https://chameleonmetadata.com/Education/VPC-Setup/images/AWS-VPC-Setup-Final-MindMap.html
---->> WARNING: If you do not either download the .csv file with the Access and Secret Access Key ID's or copy them when they are created YOU CANNOT GET THEM BACK IN THE FUTURE.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Section 15 - STUDENT HANDS-ON LAB: Confirm Your AWS CLI Version
Check version of your AWS CLI
---->> Open a command prompt with AWS CLI installed and check its version with the following command (There are two (2) hyphens in this command)
aws --version
---->> If the version is less than 2.13.0, run the following three (3) commands from the command prompt (There is one (1) hyphen in the first command)
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Section 15 - STUDENT HANDS-ON LAB:
---->> Then, Configure your AWS CLI
---->> Open a command prompt with AWS CLI installed and execute the following command (There are no hyphens in this command)
aws configure
---->> Then follow the onscreen prompts
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Section 15: Demonstration - STUDENT HANDS-ON LAB: Connect to EC2 Using EICE & CLI
---->> Complete Sections 15 and 16.1 before attempting this student lab. You will need the Access Key ID's for this exercise.
---->> Change i-YourInstanceIDGoesHere to match the Private Instance ID created during Step 11 and execute the following command (There are no hyphens in this command)
aws ec2-instance-connect ssh --instance-id i-YourInstanceIDGoesHere
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Section 18: Demonstration - STUDENT HANDS-ON LAB: Connect to EC2 Using SSM & CLI
---->> Change i-YourInstanceIDGoesHere to match the Private Instance ID created during Step 11 and execute the following command (There are four (4) hyphens in this command)
aws ssm start-session --target i-YourInstanceIDGoesHere