AWS 181-[AWSN]-Activity - Troubleshoot a VPC

  Рет қаралды 85

Mark Mungai Kuria

Mark Mungai Kuria

Күн бұрын

#AWS 181-[AWSN]-Activity - Troubleshoot a VPC
Check out my GitHub Repository - github.com/MFM...
Portfolio
1. markfrancismk.s...
2. d2taxcp5hluc5o...
Here is a detailed step-by-step guide for troubleshooting a VPC lab assignment, designed for someone new to AWS. This guide covers everything from starting the lab to completing it, including commands, explanations, potential challenges, and references to AWS documentation.
---
Lab Guide: Troubleshooting a VPC
Lab Overview
In this lab, you'll troubleshoot virtual private cloud (VPC) configurations and analyze VPC Flow Logs. The environment includes two VPCs, Amazon EC2 instances, and other networking components. You’ll follow a series of tasks to create VPC Flow Logs, troubleshoot networking issues, and analyze log data.
Objectives
By the end of this lab, you will be able to:
1. Create VPC Flow Logs.
2. Troubleshoot VPC configuration issues.
3. Analyze flow logs.
Duration
Approximately 75 minutes.
Accessing the AWS Management Console
1. Start Lab:
At the top of these instructions, choose Start Lab to launch your lab environment.
Wait until the message "Lab status: ready" appears.
Close the Start Lab panel by choosing X.
2. Retrieve Credentials:
After the lab is ready, choose Details at the top of these instructions and then Show.
Copy the credentials and other details from the Credentials panel into a text editor for later use.
3. Open AWS Management Console:
At the top of these instructions, choose AWS to open the AWS Management Console in a new tab.
Ensure pop-ups are allowed if the console does not open automatically.
Arrange both tabs (lab instructions and AWS Console) side by side for convenience.
---
Task 1: Connecting to the CLI Host Instance
1.1 Connect to the CLI Host Instance
1. Open EC2 Management Console:
In the AWS Management Console, use the search bar to find and open EC2.
2. Select CLI Host Instance:
In the navigation pane, choose Instances.
Find and select the CLI Host instance from the list.
3. Connect Using EC2 Instance Connect:
Click Connect.
On the EC2 Instance Connect tab, choose Connect to open a terminal window.
1.2 Configure AWS CLI
1. Configure AWS CLI:
In the CLI Host terminal, run the following command to configure the AWS CLI:
```bash
aws configure
```
Enter the following values when prompted:
AWS Access Key ID: Enter the value for AccessKey.
AWS Secret Access Key: Enter the value for SecretKey.
Default region name: Enter `us-west-2`.
Default output format: Enter `json`.
---
Task 2: Creating VPC Flow Logs
2.1 Create an S3 Bucket
1. Create an S3 Bucket for Flow Logs:
Run the following command, replacing `` with a unique set of six random numbers:
```bash
aws s3api create-bucket --bucket flowlog --region 'us-west-2' --create-bucket-configuration LocationConstraint='us-west-2'
```
The output will provide a URL similar to `flowlog.s3.amaz...`. Note the bucket name.
2. Handle Bucket Name Conflicts:
If you encounter a "Bucket name already exists" error, use a different set of numbers and run the command again.
2.2 Create VPC Flow Logs
1. Get VPC ID for VPC1:
Run the following command to retrieve the VPC ID for VPC1:
```bash
aws ec2 describe-vpcs --query 'Vpcs[].[VpcId,Tags[?Key==`Name`].Value,CidrBlock]' --filters "Name=tag:Name,Values='VPC1'"
```
Note the VPC ID from the output (e.g., `vpc-01edacbe1c31959d2`).
2. Create Flow Logs for VPC1:
Replace `/flowlog\` with the bucket name and `/vpc-id\` with the VPC ID from the previous step, then run:
```bash
aws ec2 create-flow-logs --resource-type VPC --resource-ids /vpc-id\ --traffic-type ALL --log-destination-type s3 --log-destination arn:aws:s3:::/flowlog\
```
Note the `FlowLogIds` and `ClientToken` from the output.
3. Verify Flow Logs Creation:
Run the following command to ensure the flow log was created:
```bash
aws ec2 describe-flow-logs
```
Confirm that the flow log status is `ACTIVE` and the log destination points to your S3 bucket.

Пікірлер: 1
@zunairapakeeza8135
@zunairapakeeza8135 Ай бұрын
Hello can i get the lab instructions?
AWS 182-[STOR]-Lab - Working with Amazon EBS
19:18
Mark Mungai Kuria
Рет қаралды 52
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Рет қаралды 295 М.
Worst flight ever
00:55
Adam W
Рет қаралды 26 МЛН
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 9 МЛН
Every parent is like this ❤️💚💚💜💙
00:10
Like Asiya
Рет қаралды 13 МЛН
Will A Guitar Boat Hold My Weight?
00:20
MrBeast
Рет қаралды 249 МЛН
AWS 175-[SCAL]-Lab - Using Auto Scaling in AWS (Linux)
45:43
Mark Mungai Kuria
Рет қаралды 72
.NET and C# are in trouble. Here is what I'd do.
10:57
Ed Andersen
Рет қаралды 71 М.
A DAY (NIGHT) in the LIFE of a NOC ENGINEER!
12:36
Custodian Data Centres
Рет қаралды 1,8 МЛН
HTTP 1 Vs HTTP 2 Vs HTTP 3!
7:37
ByteByteGo
Рет қаралды 176 М.
AWS 183-[STOR]-Lab - Managing Storage
39:32
Mark Mungai Kuria
Рет қаралды 62
What is a HomeLab?  How can you build your own and why it's useful!
20:45
IT Career Questions
Рет қаралды 219 М.
Setting up a production ready VPS is a lot easier than I thought.
29:50
He makes $3M a year with a $400 VPS
10:17
Mischa van den Burg
Рет қаралды 216 М.
Worst flight ever
00:55
Adam W
Рет қаралды 26 МЛН