Skip to content

Commit 725bd0e

Browse files
12.11 lesson-4.md
lesson-4.md update AWS: add admin AWS: create EC2 instance AWS: add secure groups AWS: add SSH key pair
1 parent 2959508 commit 725bd0e

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

.idea/.gitignore

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Course/AWS/EC2 instance.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## [AWS Configuration Cheat Sheet](https://github.com/JavaScriptonit/myselfRep/blob/main/Docker/Courses/Docker%20and%20Kubernetes:%20The%20Complete%20Guide/lesson-11.md)
2+
### EC2 Connect steps:
3+
* In AWS, navigate to Services > EC2.
4+
* Under Resources, select Running Instances.
5+
* Highlight your instance and click Connect.
6+
* In Terminal, cd into the directory containing your key and copy the command in step 3 under "To access your instance."
7+
* In Terminal, run: ssh -vvv -i [MyEC2Key].pem ec2-user@xx.xx.xx.xx(xx.xx.xx.xx = your EC2 Public IP) OR run the command in the example under step 4.
8+
9+
### debugging steps to EC2 connection time out:
10+
* Double-check the security group access for port 22
11+
* Make sure you have your current IP on there and update to be sure it hasn't changed
12+
* Make sure the key pair you're attempting to use corresponds to the one attached to your EC2
13+
* Make sure your key pair on your local machine is chmod'ed correctly. I believe it's chmod 600 keypair.pem check this
14+
* $ chmod 400 gitlab-runner-key.pem
15+
* $ ssh -i ~/Downloads/gitlab-runner-key.pem ubuntu@ec2-44-203-114-204.compute-1.amazonaws.com
16+
* Make sure you're in either your .ssh folder on your host OR correctly referencing it: HOME/.ssh/key.pem
17+
* Last weird totally wishy-washy checks:
18+
* reboot instance
19+
* assign elastic IP and access that
20+
* switch from using the IP to Public DNS
21+
* add a : at the end of user@ip:

Course/AWS/add user.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
**IAM Keys for Deployment**
2+
3+
You can use the same IAM User's access and secret keys from the single container app we created earlier,
4+
or, you can create a new IAM user for this application:
5+
6+
Search for the "IAM Security, Identity & Compliance Service"
7+
8+
Click "Create Individual IAM Users" and click "Manage Users"
9+
10+
Click "Add User"
11+
12+
Enter any name you’d like in the "User Name" field.
13+
14+
eg: docker-multi-travis-ci
15+
16+
Tick the "Programmatic Access" checkbox
17+
18+
Click "Next:Permissions"
19+
20+
Click "Attach Existing Policies Directly"
21+
22+
Search for "beanstalk"
23+
24+
Tick the box next to "AdministratorAccess-AWSElasticBeanstalk"
25+
26+
Click "Next:Tags"
27+
28+
Click "Next:Review"
29+
30+
Click "Create user"
31+
32+
Copy and / or download the Access Key ID and Secret Access Key to use in the Travis Variable Setup.

0 commit comments

Comments
 (0)