What is EBS?

Amazon Elastic Block Store (EBS) is designed to work with Amazon EC2 (Elastic Compute Cloud) instances, offering block-level storage volumes. Each EBS volume behaves like a traditional hard drive or SSD, which can be attached to a single EC2 instance at a time. Unlike ephemeral instance storage, EBS volumes are persistent, meaning data is retained even when the EC2 instance is stopped or terminated. This makes it suitable for storing operating systems, applications, and data that require durability.

How EBS volume can be increased and decreased?

AWS EBS volumes can be resized by modifying the volume either through the AWS Management Console, CLI, or API, followed by adjusting the file system on the instance.
Increasing EBS Volume Size
  1. Modify the EBS volume:
    • Go to the AWS Management Console > EC2 > Volumes, select the target volume, and choose Modify Volume.
    • Specify a larger size (in GiB), or change the volume type if desired, and confirm.
  2. Monitor the status: The volume state changes to modifying, which may take several minutes depending on the current size.
  3. Extend the file system: Once the volume resizing is completed, the operating system detect the new space:
    • Linux: Use commands like lsblk to verify the volume, then resize2fs /dev/xvdf (for ext4) or xfs_growfs /mount_point (for XFS) to extend the filesystem.
    • Windows: Use the Disk Management tool to extend the volume or run diskpart commands.
  4. Confirm the volume and file system: Ensure the new capacity is reflected both at the OS level and in the AWS console.
Decreasing EBS Volume Size
AWS does not support direct reduction of EBS volume size; you must create a smaller volume and migrate the data:
  1. Create a snapshot of the existing volume via the AWS console or CLI.
  2. Create a new, smaller EBS volume from the snapshot. Ensure the new volume is sized appropriately smaller than the original volume while accommodating all data.
  3. Attach the new volume to the instance and mount it.
  4. Verify data integrity: Ensure all required data is available and consistent on the new volume.
  5. Replace the old volume: Detach the old volume and optionally delete it, then remount the new volume as needed.
Additional Considerations
  • Instance type compatibility: Ensure your instance supports the resized volume type.
  • I/O impact: Modifying volumes may have a minor performance impact; schedule during low activity periods if performance is critical.
  • Snapshots and backups: Always snapshot data before attempting resizing or migrating volumes to prevent accidental data loss.
  • Automatic resizing: AWS Elastic Volumes can automatically adjust the size and IOPS without downtime, depending on your instance type and EBS volume type.
By following these steps, you can safely increase the size of an EBS volume directly or decrease it indirectly via snapshot and migration.

What will happen to the associated resources of an instances while deleting?

When you terminate or delete an AWS EC2 instance, multiple processes simultaneously act on both the instance and its associated resources. The outcome depends on the type of resources, their configuration, and AWS lifecycle policies. Here's a detailed breakdown:
1. Instance State Transitions
  • Running → Shutting-down → Terminated
  • As soon as a termination command is issued, AWS marks the instance for shutting-down, deallocates CPU and memory resources, and initiates cleanup. After teardown, the instance is recorded as terminated, permanently removing it from your active instances.
2. Resource Categorization
Associated resources either persist or are deleted based on their type and configuration:

Could you modify an EBS volume while it is in active?

Yes, an AWS EBS volume can be modified while it is in active use using Elastic Volumes, allowing you to change its size, type, or performance without detaching it or stopping the instance.

what is client end encryption?

Client-end encryption, commonly referred to as client-side encryption (CSE) in the context of AWS Key Management Service (KMS), is an encryption paradigm in which the encryption of data occurs on the client side, before the data is transmitted or stored in AWS services such as S3, EBS, or DynamoDB. This provides end-to-end security, ensuring that AWS never sees the plaintext data.