You can create an AMI using the AWS Management Console, AWS CLI (Command Line Interface), or AWS SDKs. Below is an example using AWS CLI:
# Replace instance-id with your instance's ID
aws ec2 create-image --instance-id i-1234567890abcdef0 --name "My server AMI" --description "AMI for my server"