AWS vs Azure
| AWS |
Azure |
|
| Infrastructure | ||
|
|
|
|
Nil |
RG (Resource Group) | |
Networking |
||
|
Networking & Content Delivery:
|
Virtual Network (Vnet):
|
|
Compute |
||
|
|
|
|
Storage |
||
|
|
|
|
Security, Identity & Compliance / Identity |
||
|
|
|
|
Databases |
||
|
|
|
Containers |
||
|
|
|
|
Web & Mobile (Web App) |
||
|
|
|
> 

Management Group:






| Azure Login | Login |
PS: Connect-AzAccount (A popup windows will appear, enter credentials) PS: Connect-AzAccount -TenantId "xxxxxxxx" (connect to a different Tenant ID) |
| Logout | PS: Logout-AzAccount | |
| Subscription | List | PS: Get-AzSubscription |
| list of specific subscription | PS: Get-AzSubscription-TenandId "xxxxxxxx" | |
| select subscription | PS: Get-AzSubscription "xxxxxxx" | |
| Resource Group | List of all RG | Ps:Get-AzResourceGroup |
| Create empty RG | PS: New-AzResourceGroup -Name RG01 -Location "uksouth" | |
| PS: New-AzResourceGroup RG02 "uksouth" | ||
| with Tags | PS:New-AzResourceGroup -Name RG03 -Location "uksouth" -Tag @{Empty=$null; Department="Marketing"} | |
| Delete RG | PS:Remove-AzResourceGroup -Name "RG01" confirm yes/no |





Blank ARM Template json file.

Deploy the above blank template in TestRG (Resource Group):
Remove Storage Account with powershell:
PS: Remove-AzStorageAccount -ResourceGroupName "TestRG" -AccountName "starstorage1973" -Force
Parameters: It refers to actual values, which can be call multiple times in code. Example
5+5 = 10 (these values can be defined in varibales)
$a=5
$b=5
$c = $a+$b
$c
In powershell when you define $c it gives result = 10.

Storage Account deployment using Parameters:
Functions:
Variables:

PS C:\ New-AzResourceGroup -Name RG01 -Location "uksouth" (Required Parameter):
| Azure Login | Login | PS: Connect-AzAccount (A popup windows will appear, enter credentials) |
| Logout | PS: Logout-AzAccount | |
| Subscription | List | PS: Get-AzSubscription |
| list of specific subscription | PS: Get-AzSubscription-TenandId "xxxxxxxx" | |
| select subscription | PS: Get-AzSubscription "xxxxxxx" | |
| Resource Group | List of all RG | Ps:Get-AzResourceGroup |
| Create empty RG | PS: New-AzResourceGroup -Name RG01 -Location "uksouth" | |
| PS: New-AzResourceGroup RG02 "uksouth" | ||
| with Tags | PS:New-AzResourceGroup -Name RG03 -Location "uksouth" -Tag @{Empty=$null; Department="Marketing"} | |
| Delete RG | PS:Remove-AzResourceGroup -Name "RG01" confirm yes/no |
resource "azurerm_resource_group" "RG" {
name = "star-RG"
location = "UK South"
}






| VPN | Azure Bastion |
|---|---|
| Connects whole network | Connects specific VM |
| Requires VPN client | Browser-based |
| More complex | Easier setup |
| Network-level access | VM-level access |







resource "azurerm_subnet" "example" {
name = "example-subnet"
resource_group_name = azurerm_resource_group.example.name
virtual_network_name = azurerm_virtual_network.example.name
address_prefixes = ["10.0.1.0/24"]
delegation {
name = "delegation"
service_delegation {
name = "Microsoft.ContainerInstance/containerGroups"
actions = ["Microsoft.Network/virtualNetworks/subnets/join/action", "Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action"]
}
}
}
| Login | PS:Connect-AzAccount - select correct subscritpion PS:Select-AzSubscription -SubscriptionId "xxxx" | |
| RG | Create | PS:New-AzResourceGroup -Name TestRG -Location UKSouth |
| Vnet | Create | PS:New-AzVirtualNetwork -ResourceGroupName TestRG -Location UKSouth -Name Test-Vnet -AddressPrefix 10.0.0.0/16 |
| List | PS:Get-AzVirtualNetwork | |
| Subnet | Create | PS: New-AzVirtualNetworkSubnetConfig -Name Test-Subnet1 -AddressPrefix 10.0.0.0/24 |
| Vnet-Subnet | Link | PS: |
$vNetName = 'Test-Vnet'
$resourceGroupName = 'TestRG'
$location = 'UKSouth'
$AddressPrefix = @('10.0.0.0/16')
$subnet01Name = 'Test-Subnet1'
$subnet01AddressPrefix = '10.0.1.0/24'
#Create new Azure Virtual Network with above subnet configuration
New-AzVirtualNetwork -Name $vNetName -ResourceGroupName $resourceGroupName -Location $location -AddressPrefix $AddressPrefix -Subnet $subnet01
#########################################################
#Remove Azure Virtual Network
Remove-AzVirtualNetwork -Name $vNetName -ResourceGroupName $resourceGroupName
#########################################################
configure a private and a public IP address in PowerShell, and associate them to this VNet.
When we created the VNet, a private IP address was already created for us automatically by Azure. However, we are going to create another and associate it, together with the public IP address, to a network interface card (NIC).
-Name PacktPrivateIP `
-Subnet $subnet `
-PrivateIpAddress 10.0.0.4 `
-PublicIPAddress $publicIP `
-Primary
-Name PacktNIC `
-ResourceGroupName PacktVNetResourceGroup `
-Location EastUS `
-IpConfiguration $IpConfig





Same region but different virtual networks. They may be on same/diff subscription, same/diff tenant.
connection between two Vnets where both are on same region but different virtual network. They may be on same/diff subscription, same/diff tenant.
Peering means transfer of data between connected sources without using internet. When you create peering your resources will communicate using private IP address but name resolution will not take place.
There is no DNS in peering and you need to define your DNS for name resolution.
Adding address space or new subnets after peering is created not possible, so delete peering and add new address space or subnet and recreate peering.
The traffic between virtual machines in the peered virtual networks is routed through the Microsoft backbone infrastructure, much like traffic is routed between virtual machines in the same virtual network, through private IP addresses only.
Peering provides IP connectivity only. It does not contain name resolution. The Cloud Administrator must understand clearly if the machines are being joined to a domain (Active Directory DNS resolution recommended) or if they are going to rely on default Azure name resolution.
Peering Data Transfer charges: When using VNET peering traffic is charged for ingress (inbound) and egress (outbound) at both ends of the peered networks.
Peering is a 1-to-1 relationship, and they are intransitive.
For example: if you have these following peering connections configured A<to>B and A<to>C networks, there is no IP connectivity between B and C networks. If there is a need to connect those networks, we would have a couple of options to choose from:
You can also configure spokes to use the hub VNet gateway to communicate with remote networks.
You can also configure spokes to use the hub gateway to communicate with remote networks. To allow gateway traffic to flow from spoke to hub, and connect to remote networks, you must:
Important:
Check ICMP Allowed in VMs:
Let’s review the different data charges in the following common scenarios.
1. VPN
Azure supports Site-to-Site and Point-to-Site VPN connections from on-premises data centers. These connections terminate in a virtual network gateway created for a specific Azure Virtual Network. While a Site-to-Site VPN is used for extending an on-premises network to Azure, it can also be used to connect one Azure VNet to another. On the other hand, a Point-to-Site VPN is for mobile users or traveling users who want to connect securely to an Azure network from a public network.
Data egress for Site-to-Site and Point-to-Site connections are charged at regular data transfer rates.
The first 5GB/month (outbound) is free, and any data transfer beyond that is charged based on the following usage slab:
Outbound Data Transfers:
For data transfers beyond 500TB, customers should contact the Microsoft sales team to get an organization-specific deal.
2. ExpressRoute
Microsoft Azure ExpressRoute offers direct connections without traversing the internet between on-premises data centers and Azure. There are two types of billing plans associated with ExpressRoute; data charges depend on the plan selected by the client. For metered plans, inbound data transfer is free, but customers are charged for outbound data transfer based on Azure data center regions grouped as zones.
For ExpressRoute traffic, the zones are defined as follows:
Zone 1: West US, East US, North Central US, South Central US, East US 2, Central US, West Europe, North Europe, France Central, France South, Canada East, Canada Central.
Zone 2: East Asia, Southeast Asia, Australia East, Australia Southeast, Japan East, Japan West, Korea Central, Korea South, India South, India West, India Central.
Zone 3: Brazil South.
Outbound data is charged at a rate of;
In unlimited billing plans, both inbound and outbound data transfers are free because the client must pay a flat fee based on the selected port speed.
3. Application Access:
Outbound data transfer rates apply when hosted applications or VMs are accessed directly over the Internet. Some common examples include accessing or downloading files from applications, management activities through RDP and SSH connections for VMs.
The data transfer rates are the same as what was explained in the VPN section above.
Data Traffic Costs and Availability Zones.
Azure offers three availability zones in enabled regions to ensure high availability.
Azure places VMs in fault domain and update domains after the VMs are deployed in an availability zone.
Azure availability zones are generally available now and all inbound and outbound data is free until February 1, 2019. From that date forward, charges of $0.01/GB will be applied to all data transfers connected to the same VNet from a resource in an availability zone to another resource in a different availability zone.
4. Intra-Network Traffic: Peering
VNet peering seamlessly connects two Azure VNets, allowing traffic to traverse the Microsoft backbone infrastructure without using a virtual network gateway. VNet peering is a preferred method of connecting two Azure VNets because it helps avoid charges associated with a virtual network gateway. It’s also more secure because the traffic passes through the Microsoft backbone network.VNet peering is particularly useful in hub-spoke topologies.
In such topologies, the hub VNet hosts the management components and applications are segregated to different spoke VNets. These spoke VNets are connected to the Hub network through VNet peering.
Different data charges apply for VNet peering between the same Azure region and different Azure regions, otherwise known as Global VNet Peering. It’s important to note that both inbound and outbound traffic incurs charges for VNet peering. VNet peering in the same region incurs an inbound and outbound data transfer charge of $0.01/GB. For Global VNet Peering, the transfer rates are dependent on the zones between which the data is being transferred.



If you want to add additional connections, navigate to the virtual network gateway from which you want to create the connection, then select Connections. You can create another VNet-to-VNet connection, or create an IPsec Site-to-Site connection to an on-premises location. Be sure to adjust the Connection type to match the type of connection you want to create.
You can create site to site connection with on-premise 2 and 3, site to site connection from subscription1 to subscription 2 etc..








1. Create a Vnet:
2. Create a Gateway subnet:
3. Create a Virtual Network Gateway : selecting connection type site-to-site
4. Create Local Network Gateway: Create a local network gateway to represent the on-premises site that you want to connect toa virtual network. The local network gateway specifies the public IP address of the VPN device and IP address ranges located on the on-premise site.
5. VPN Connection:
Need to create tunnel between Azue and On-premise:
Go to connection and download file after selecting the on-prem device. a configuration file will be downloaded and it contain steps to perform at on-prem vpn device.
6. Create a VM for testing:
On-Premise Configuration.
1. Configure your VPN Device: use downloaded file

| Azure Service | Purpose |
|---|---|
| Microsoft Azure Storage Accounts | Secure access to Blob, File, Queue, Table |
| Azure SQL Database | Private access to SQL databases |
| Azure Cosmos DB | Secure database connectivity |
| Azure Key Vault | Secure secrets and certificates |
| Azure Service Bus | Messaging services |
| Azure Event Hubs | Streaming/event ingestion |
| Azure App Service | Web apps access restriction |
| Azure Container Registry | Secure image pulls |
| Azure Data Lake Storage | Big data storage |
| Azure Synapse Analytics | Analytics platform |
| Azure Cognitive Services | AI services |
| Azure Backup | Backup traffic security |
Suppose you have:
star-Vnet1star-Subnet1starstorage1You can:
star-Subnet1Result:


$acctKey = ConvertTo-SecureString -String "fKtbWJcgcTcXyldyPze4XImnHcqTGLu+jiONoKbMGm6ooH2WH4usmfjkhr8FiV9BJI2w2subxftL+AStZh+EmQ==" -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential -ArgumentList "Azure\starstorage1", $acctKey
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\starstorage1.file.core.windows.net\star-fileshare" -Credential $credential




$acctKey = ConvertTo-SecureString -String "fKtbWJcgcTcXyldyPze4XImnHcqTGLu+jiONoKbMGm6ooH2WH4usmfjkhr8FiV9BJI2w2subxftL+AStZh+EmQ==" -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential -ArgumentList "Azure\starstorage1", $acctKey
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\starstorage1.file.core.windows.net\star-fileshare" -Credential $credential


$acctKey = ConvertTo-SecureString -String "fKtbWJcgcTcXyldyPze4XImnHcqTGLu+jiONoKbMGm6ooH2WH4usmfjkhr8FiV9BJI2w2subxftL+AStZh+EmQ==" -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential -ArgumentList "Azure\starstorage1", $acctKey
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\starstorage1.file.core.windows.net\star-fileshare" -Credential $credential



Public IP addresses can be used in the following resources:
Basic:
Standard:
Topology:
#Set the variables
$SubscriptionI = "<Subscription ID>"
$VM = "<VM Name>"
$ResourceGroup = "<Resource Group>"
$VNET = "<Virtual Network>"
$IP = "NEWIP"
#Log in to the subscription
Add-AzAccount
Select-AzSubscription -SubscriptionId $SubscriptionId
#Check whether the new IP address is available in the virtual network.
Test-AzureStaticVNetIP –VNetName $VNET –IPAddress $IP
#Add/Change static IP. This process will not change MAC address
Get-AzVM -ServiceName $ResourceGroup -Name $VM | Set-AzureStaticVNetIP -IPAddress $IP | Update-AzVM
Lab: Add Multiple IP Address to a VM:




.com, .co.uk, .net registry).A record → 192.168.1.10 (public website IP)MX record → mail serverDomain Registration Process:
After adding txt record go back to azure and click verify and once it is verified custom domain is configured.


















or 





Region level: 
Example of fault domain and update domain count:
There will be 2-3 fault domain and 5-20 update domains in any availability set, how it calculate as follows:
1 VM: there will be 1 fault domain and 1 update domain. (FD0 and UD0)
2 VM: 2 fault domain and 2 update domain.(FD0, FD1 and UD0, UD1)
3 VM: 2,1 fault domain and 3 update domain.(FD0,FD1,FD0) and (UD0,UD1,UD2)
4 VM : 2,2 fault domain and 4 update domain (FD0,FD1,FD0,FD1) and (UD0,UD1,UD2,UD3)
5 VM: 2,2 fault domain and 4,1 update domain (FD0,FD1,FD0,FD1,FD0) AND (UD0,UD1,UD2,UD3,UD4,UD0) et...





#Install IIS server role.
Install-WindowsFeature -name Star-WebServer -IncludeManagementTools
#Remove default html file
Remove-Item c:\inetpub\wwwroot\iisstart.htm
#Add a new html file that display server name
Add-Content -Path "C:\inetpub\wwwroot\iisstart.htm" -Value $("Welcome from " + $env:computername)
Enter required fields.






paste the following text into a vbs file:
Dim goal
Dim before
Dim x
Dim y
Dim i
goal = 2181818
Do While True
before = Timer
For i = 0 to goal
x = 0.000001
y = sin(x)
y = y + 0.00001
Next
y = y + 0.01
Loop




INFO: Scanning...
INFO: Autologin not specified.
INFO: Authenticating to destination using Azure AD
INFO: Any empty folders will not be processed, because source and/or destination doesn't have full folder support
Job 999f5f49-405c-8f41-5ee3-476974829fa3 has started
Log file is located at: C:\Users\Admin\.azcopy\999f5f49-405c-8f41-5ee3-476974829fa3.log
INFO: Authentication failed, it is either not correct, or expired, or does not have the correct permission PUT https://starstorage2.blob.core.windows.net/blobcontainer1/sv=2022-11-02&ss=bfqt&srt=sco&sp=rwdlacupiytfx&se=2024-09-12T20:09:42Z&st=2024-09-12T12:09:42Z&spr=https&sig=-REDACTED-
--------------------------------------------------------------------------------
RESPONSE 403: 403 This request is not authorized to perform this operation using this permission.
ERROR CODE: AuthorizationPermissionMismatch
--------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthorizationPermissionMismatch</Code><Message>This request is not authorized to perform this operation using this permission.
RequestId:8cd1509c-601e-007c-710c-05aed1000000
Time:2024-09-12T12:08:40.4260833Z</Message></Error>
--------------------------------------------------------------------------------
INFO: Authentication failed, it is either not correct, or expired, or does not have the correct permission PUT https://starstorage2.blob.core.windows.net/blobcontainer1/sv=2022-11-02&ss=bfqt&srt=sco&sp=rwdlacupiytfx&se=2024-09-12T20:09:42Z&st=2024-09-12T12:09:42Z&spr=https&sig=-REDACTED-
--------------------------------------------------------------------------------
RESPONSE 403: 403 This request is not authorized to perform this operation using this permission.
ERROR CODE: AuthorizationPermissionMismatch
--------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthorizationPermissionMismatch</Code><Message>This request is not authorized to perform this operation using this permission.
RequestId:25f2b890-d01e-0046-800c-05b4a9000000
Time:2024-09-12T12:08:40.4276234Z</Message></Error>
--------------------------------------------------------------------------------







































After adding txt record go back to azure and click verify and once it is verified custom domain is configured.




















Configure/Manage Azure Entra ID Blade:
Manage:




Authentication Method in Password Reset:














User Blade/settings: Perform configuration and settings for a user.

















Monitoring:
Troubleshooting + Support:

Lab: Microsoft Entra Domain Services:
Basics:
Networking:
Administration:
Synchronization:
Security settings:
Review and create: it will take 1/2 hr to 2 hr. Once deployment is succeeded, check it.
Overview:
Settings:
Configure DNS IP address in Virtual Network:
Create a VM and join domain: Whenever a virtual machine join the domain, it first contact the DNS server, configuration of DNS is done in above step.

RBAC- Role Based Access Control:
Lab:


































AWS Administration:















Main route table—The route table that automatically comes with your VPC. It controls the routing for all subnets that are not explicitly associated with any other route table.
Custom route table—A route table that you create for your VPC.
Destination—The range of IP addresses where you want traffic to go (destination CIDR). For example, an external corporate network with the CIDR 172.16.0.0/12.
Target—The gateway, network interface, or connection through which to send the destination traffic; for example, an internet gateway.
Local route—A default route for communication within the VPC. If the VPC has both IPv4 and IPV6 addresses, there is a local route for IPv4 and a local route for IPv6.
Route table association—The association between a route table and a subnet, internet gateway, or virtual private gateway.
Subnet route table—A route table that's associated with a subnet.
Propagation—If you've attached a virtual private gateway to your VPC and enable route propagation, we automatically add routes for your VPN connection to your subnet route tables. This means that you don't need to manually add or remove VPN routes. For more information, see Site-to-Site VPN routing options in the Site-to-Site VPN User Guide.
Gateway route table—A route table that's associated with an internet gateway or virtual private gateway.
Edge association—A route table that you use to route inbound VPC traffic to an appliance. You associate a route table with the internet gateway or virtual private gateway, and specify the network interface of your appliance as the target for VPC traffic.
Transit gateway route table—A route table that's associated with a transit gateway. For more information, see Transit gateway route tables in Amazon VPC Transit Gateways.
Local gateway route table—A route table that's associated with an Outposts local gateway. For more information, see Local gateways in the AWS Outposts User Guide.





















|
Bootstrap Script: script will run after creation of instance, script to deploy additional services or sofwares can be used. #! /bin/bash sudo su yum install httpd -y service httpd start cd /var/www/html echo "Welcome to star distributors" >> index.html |
| System Status Check: Related to hardware | First hardware of an instance will be checked, if it fails it shows status 0/2 means hardware & o/s both fail, Troubleshoot: Instance stop and start as it will start on another hardware/rack. |
|
Instance Status Check: Related to hardware |
Related to O/S: if status shows 1/2 means hardware check is good but o/s is failed, Troubleshoot: reboot the instance so a new o/s will be loaded. 2/2 means both are ok. |
Instance Termination Protection: To avoid accidental instance termination, select instance > action > protect deletion.



| London Region | Other Region |
| Create Instance: install apache, other softwares | create an instance using my Image at AMI |
| select EBS volume, action > create Image, Go to Images> select image and copy to desired to region. |
| London Region | frankfurt Region |
|
Instance: Volume1 (boot volume), Volume2 (Data) Go to Voume> Select Volume2>action>create snapshot (snapshotlondon) |
Go to snapshot> select snapshot> action >Create a volume, once the instance is created then attach this volum, make sure volume is create in the same zone of instance to which this volume will be attached. or during instance creation in storge/add volume, enter snapshot ID to create volume. |
| Select snapshotlondon and go to action and copy to frankfurt Region |
| Scale UP/Down- Vertical Scaling | Scale In / Out - Horzontal Scaling | |||||||
|
It is refered as Hardware configuration increase / decrease. Hardware: RAM & CPU come together , Up/Down together, while volume size can alone increase/decrease.
|
It is referred as adding / removing Instances. To maintain availability and distribute load balancing an instances can be increased manually or automatically with Autoscaling.
|












EBS is a virtualized SAN or storage area network. That means it is RAID storage to start with so it’s redundant and fault tolerant. If disks die in that RAID you don’t lose data. Great! It is also virtualized, so you can provision and allocate storage, and attach it to your server with various API calls. No calling the storage expert and asking him or her to run specialized commands from the hardware vendor.
Performance on EBS can exhibit variability. That is it can go above the SLA performance level, then drop below it. The SLA provides you with an average disk I/O rate you can expect. This can frustrate some folks especially performance experts who expect reliable and consistent disk throughput on a server. Traditional physically hosted servers behave that way. Virtual AWS instances do not.Backup EBS volumes by using the snapshot facility via API call or via a GUI interface like elasticfox.
Improve performance by using Linux software raid and striping across four volumes.
































.com, .co.uk, .net registry).A record → 192.168.1.10 (public website IP)MX record → mail serverDomain Registration Process:

































