Cli AWS - Incident
List of commonly used AWS CLI
With EC2 - Network - Log
aws ec2 describe-instances --profile aws-tcbs | jq -r '.Reservations[].Instances[] | .InstanceId + " " + .InstanceType + " " + (.Tags[] | select(.Key == "Name").Value)'aws ec2 describe-security-groups --profile aws-tcbs | jq -r '.SecurityGroups[]|.GroupId+" "+.GroupName'aws ec2 describe-subnets--filter Name=vpc-id,Values=<Your_VPC_ID> --profile aws-tcbs | jq -r '.Subnets[]|.SubnetId+" "+.CidrBlock+" "+(.Tags[]|select(.Key=="Name").Value)'aws logs describe-log-groups --profile aws-tcbs --region <region>aws s3 cp s3://<log_bucket_here>/AWSLogs . --recursive --profile aws-tcbsaws ec2 create-snapshot --volume-id <volume_id> --description "Snapshotcreated"
aws ec2 create-volume --availability-zone ap-southeast-1 --snapshot-id <snapshot_id>coldsnap --region ap-southeast-1 download <snapshot_id> image.ddWith IAM Log
IAM Logs
VPC flow Logs
Last updated