Skip to main content

EBS Volume

  • Its network volume or Network volume like(Network Pendrive not physical drive) we can add to any EC2 instance as store space.
  • It will not terminate after you terminate your EC2 instacne.
  • You can attach 1 volume to 1 instance at a time and also need to be in same availability zone.
  • Root EBS volume will be deleted not the others attached volume while the EC2 instance terminates

EBS Volume Snapshots

  • Backup your EBS volume by taking a snpshots

AMI

Amazon Machine Images are a customization of an EC2 instance, that means we can customize a ec2 instacne then latter we can reuse that image. The main facility we will get from AMI is faster boot and configuration time because those things are already install in that AMI.

  • AMI create for specific region

EBS Volume types

  • GP2/GP3(SSD) : General purpose SSD volume that balance price and performance
  • io1 / io2 Block Express (SSD) : Highest-performace SSD volumn for mission-critical low latancy or high-throughput(In same Availability zone io1/io2 volume can be use by multiple EC2 instance upto 16 instance)
  • st1 (HDD): Low cost hdd volume
  • sc1 (HDD) :Lowest cost HDD volume designed for less frequently access
  • Only gp2,gp3,io1,io2 can be use as a boot volume

    Better check this https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html

IOPS; I/O ops per sec

Hoisting For (let, const, var)

let and const are hoisted to the top of the block they
are in but not initialized to the default undefined value so
we can not use them until they are declared.
If we do,RerefenceError is thrown.

Variables declared using var can be accessed before they are declared and are equal to undefined.

Remember hoisting means declarations are moved to the top of their scope not the initialization.

What is $(This) keyword in Node Enviornment

The things i need to remember:

In a normal function / function declaration / named function, “this” keyword refers to the object that the function is called

Arrow functions do not have their own bindings, so when “this” is accesses inside an arrow function, it is taken from outside.

when “this” keyword is used in a named function/function declaration, the “this” keyword is equal to the global object as long as the named function is in the global scope and not called on any object.

In the global scope the “this” keyword refers to module.exports object.

In a function expresson in the gloabal scope this keyword reffers to module.exports object.

What’s the Difference Between IAM Roles and IAM Policies in AWS?

Policy : Policy define permission of aws identity(users, group, roles) or resource within the aws account. Policy ensure that only the authorized usrs have access to specific asstes. Permissions defined within a policy either allow or deny access for the user to perform an action on a specific resource.

A policy can be identity based or resuorce based. Identity-based policies are attached to an identity (a user, group, or role) and ensure the permissions of that specific identity. On the other hand a resource-based policy defines the permissions around the specific resource—by specifying which identities have access to a specific resource and when.

Role : Role are designed so that a set of permissions can easily be assign to users on an individual basis. For example, instead of assigning an individual all their necessary permissions one at a time, they can be assigned a specific role that contains all the necessary permissions in a single step.