#!/usr/bin/python

import boto3

kms_client = boto3.client('kms')
response = kms_client.create_key(Description="testing key")

# Return the key ID and ARN
Key_id=response['KeyMetadata']['KeyId']
print (Key_id)

#====================================== Enable key rotation======================================

response = kms_client.enable_key_rotation(
    KeyId=Key_id
)

c85f5eb122a74dd4c4e13f44343f9aa8df2bd918
<mask token>

<mask token>
print(Key_id)
<mask token>

<mask token>
kms_client = boto3.client('kms')
response = kms_client.create_key(Description='testing key')
Key_id = response['KeyMetadata']['KeyId']
print(Key_id)
response = kms_client.enable_key_rotation(KeyId=Key_id)

import boto3
kms_client = boto3.client('kms')
response = kms_client.create_key(Description='testing key')
Key_id = response['KeyMetadata']['KeyId']
print(Key_id)
response = kms_client.enable_key_rotation(KeyId=Key_id)

#!/usr/bin/python

import boto3

kms_client = boto3.client('kms')
response = kms_client.create_key(Description="testing key")

# Return the key ID and ARN
Key_id=response['KeyMetadata']['KeyId']
print (Key_id)

#====================================== Enable key rotation======================================

response = kms_client.enable_key_rotation(
    KeyId=Key_id
)
