AWS Assignment
* ] Add MFA to the root account
IAM --> Security credentials --> Assign MFA device
-
Next time when you log in to console it will ask you the OTP as well
* ] Setup Zero-spend budget and custom monthly budget.
- Billing and Cost Management --> Budgets --> Overview
* ] Enable Hydrabad region
* ] Cloud watch agent on EC2 machine
Create instances & turn on Detailed monitoring
For Custom Metrix you have to install cloud watch agent
Attach IAM policy to EC2 instance as above
Go to cloud watch metrics and add things
When you configuer the agent you can see the Custom metrics
* ] JQ COMMANDS
jq is a powerful command-line tool for parsing JSON data. It allows you to extract, manipulate, and transform JSON data using a simple and expressive syntax. Here are some commonly used jq
*] N-TIER ARCHITECTURE
N-tier architecture is a software architecture pattern used in designing and developing complex applications. The "N" stands for any number, indicating the possibility of having multiple tiers or layers in the architecture. Each tier represents a distinct part of the system, with specific responsibilities and functionalities. Here's a typical breakdown of the tiers;
Presentation Tier (Client Tier): This tier represents the user interface layer where the interaction between the user and the application occurs. It handles user inputs, displays information, and sends requests to the business logic tier for processing.
Application Tier (Business Logic Tier): Also known as the middle tier or logic tier, it contains the business logic of the application. It processes requests from the presentation tier, performs computations, manipulates data, and interacts with the data tier for persistence.
Data Tier (Data Access Tier): This tier manages the storage and retrieval of data. It includes databases, file systems, or any other data storage mechanism. It is responsible for handling data storage, retrieval, and manipulation operations. Additional tiers can be added based on the complexity and requirements of the application.
*] Detach volume from one instance and take a snapshot and create volume and attach to another EC2
*] Cross Account access
Role that I gave
Other account was able to access my account
I was able to access other account
*] EC2-userdata
#!/bin/bash
sudo yum update
sudo yum install httpd -y
sudo service httpd start
sudo service httpd enable
sudo yum install wget -y
sudo yum install unzip -y
wget https://s3.amazonaws.com/amazoncloudwatch-
agent/linux/amd64/latest/AmazonCloudWatchAgent.zip
sudo unzip AmazonCloudWatchAgent.zip
sudo ./install.sh
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a
fetch-config -m ec2 -c ssm:AmazonCloudWatch-linux -s
sudo mkdir -p /usr/share/collectd/
sudo touch /usr/share/collectd/types.db
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a
fetch-config -m ec2 -c file:/path/to/your/configuration/file.json -s
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a
start
sudo systemctl start amazon-cloudwatch-agent
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -
m ec2 -status
*] DHCP
Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway
DHCP uses UDP port 67 on the server side and UDP port 68 on the client side. DHCP also has two versions: DHCPv4 and DHCPv6 to support IPv4 and IPv6, respectively. These two versions, much like the two versions of IP, are very different and are therefore considered separate protocols and use separate ports.