title: How to display only AMI id returned by boto3 instance.create_image()
body: <p>Below is a boto3 code to create an ami from the given ec2 instance.
  How can I modify the output to extract only the value of the created AMI id ?</p>
  
  <pre><code>import boto3
  
  ec2 = boto3.resource('ec2')
  
  instance = ec2.Instance('xxxxxxxxxxx')
  image = instance.create_image(
                  BlockDeviceMappings=[
                  {
                      'DeviceName': '/dev/sda1',
                      'Ebs': {
                          'DeleteOnTermination': True,
                      }
                  }
              ],
  
  
          Name='xxxxxxxxxxxxxxxxxxxx'
  )
  image.wait_until_exists('self',Filters=[{'Name':'state','Values':['available']}])
  print("Image Created ",image)
  </code></pre>
  
  <p>The output of the above code is:</p>
  
  <pre><code>Image Created  ec2.Image(id='ami-0c59fddbexxxxxxxxxx')
  </code></pre>