Here's a Python program that takes user input for creating EBS snapshots, initializing volumes, and changing encryption keys for EBS volumes using the AWS SDK (Boto3). ```python import boto3 # Initialize AWS clients ec2 = boto3.client('ec2') def create_snapshot(): # Take user input for the volume ID and description volume_id = input("Enter the EBS volume ID for snapshot creation: ") description = input("Enter a description for the snapshot: ") # Create an EBS snapshot snapshot = ec2.create_snapshot( VolumeId=volume_id, Description=description ) print(f"Snapshot {snapshot['SnapshotId']} created.") def initialize_volume(): # Take user input for the volume ID and description volume_id = input("Enter the EBS volume ID for initialization: ") description = input("Enter a description for the volume initialization: ") # Initialize the EBS volume from a snapshot response = ec2.create_volume( AvailabilityZone='us-east-1a', # Replace with your desired availability zone SnapshotId='your-snapshot-id', # Replace with the snapshot ID to initialize from Description=description ) print(f"Volume {response['VolumeId']} initialized from snapshot.") def change_encryption_key(): # Take user input for the volume ID and new KMS encryption key ARN volume_id = input("Enter the EBS volume ID for encryption key change: ") kms_key_arn = input("Enter the new KMS encryption key ARN: ") # Modify the volume's encryption key ec2.modify_volume( VolumeId=volume_id, KmsKeyId=kms_key_arn ) print(f"Encryption key for volume {volume_id} changed to {kms_key_arn}.") if __name__ == '__main__': while True: print("EBS Volume Management Menu:") print("1. Create Snapshot") print("2. Initialize Volume from Snapshot") print("3. Change Encryption Key") print("4. Exit") choice = input("Select an option (1/2/3/4): ") if choice == '1': create_snapshot() elif choice == '2': initialize_volume() elif choice == '3': change_encryption_key() elif choice == '4': break else: print("Invalid choice. Please select a valid option.") ``` Before running this program, make sure to configure your AWS credentials, region, and customize the AvailabilityZone in the initialize_volume function. You'll also need to replace `your-snapshot-id` with the actual snapshot ID you want to use for volume initialization. This program provides a simple command-line menu for creating snapshots, initializing volumes from snapshots, and changing encryption keys for EBS volumes. It demonstrates how to take user input and use Boto3 to interact with AWS EBS resources.