aws ec2 describe-instances
aws ec2 describe-images --owners amazon --filters "Name=name,Values=amzn-ami-hvm-*" --query 'Images[*].[ImageId,CreationDate]' --output text | sort -k2 | tail -n 1
aws ec2 create-image --instance-id <instance-id> --name "Updated AMI" --description "Updated AMI for security patching"
aws ec2 describe-security-groups
aws ec2 describe-security-groups --filters Name=ip-permission.cidr,Values=0.0.0.0/0
aws ec2 revoke-security-group-ingress --group-id <security-group-id> --protocol <protocol> --port <port> --cidr <cidr>
aws s3api create-bucket --bucket <bucket-name> --region <region>
aws cloudtrail create-trail --name <trail-name> --s3-bucket-name <bucket-name>
aws cloudtrail start-logging --name <trail-name>
aws cloudtrail describe-trails --trail-name-list <trail-name>
create_snapshot
method to create a snapshot of the volume.copy_snapshot
method to copy the snapshot and enable encryption during the copy process.create_volume
method to create a new encrypted volume.create_flow_logs
method to enable them.put_configuration_recorder
and put_delivery_channel
methods to enable it.