To call a Key Management Service (KMS) API operation, you must send an HTTPS GET or HTTPS POST request to the KMS endpoint. You must add the request parameters that correspond to the API operation being called. After you call the API operation, the system returns a response. Requests and responses are encoded in UTF-8.

Request syntax

KMS API operations use the RPC protocol. You can call KMS API operations by sending HTTPS GET or HTTPS POST requests.

The following request syntax is used:
The following table describes the parameters in the request syntax.
Parameter Description
Endpoint The endpoint of the KMS API. For more information, see Endpoints.
Action The name of the operation being called. For example, to create a customer master key (CMK), you must set the Action parameter to CreateKey.
Version The version number of the API. The version number of the KMS API is 2016-01-20.
Parameters The request parameters for the operation. Separate multiple parameters with ampersands (&).

Request parameters include common parameters and operation-specific parameters. Common parameters include the API version number and authentication information. For more information, see Common parameters.

Sample requests

The following sample request is used to call the CreateKey operation to create a CMK.
Note The sample request is formatted to improve readability.


Region RegionId Public endpoint VPC endpoint
Japan (Tokyo) ap-northeast-1
Singapore (Singapore) ap-southeast-1
Australia (Sydney) ap-southeast-2
Malaysia (Kuala Lumpur) ap-southeast-3
Indonesia (Jakarta) ap-southeast-5
Philippines (Manila) ap-southeast-6
India (Mumbai) ap-south-1
China (Hangzhou) cn-hangzhou
China (Shanghai) cn-shanghai
China (Qingdao) cn-qingdao
China (Beijing) cn-beijing
China (Zhangjiakou) cn-zhangjiakou
China (Hohhot) cn-huhehaote
China (Ulanqab) cn-wulanchabu
China (Shenzhen) cn-shenzhen
China (Heyuan) cn-heyuan
China (Guangzhou) cn-guangzhou
China (Chengdu) cn-chengdu
Germany (Frankfurt) eu-central-1
UK (London) eu-west-1
UAE (Dubai) me-east-1
China (Hong Kong) cn-hongkong
US (Virginia) us-east-1
US (Silicon Valley) us-west-1
China East 1 Finance cn-hangzhou-finance None
China East 2 Finance cn-shanghai-finance-1
China South 1 Finance cn-shenzhen-finance-1
China North 2 Finance cn-beijing-finance-1


You must call KMS API operations by sending HTTPS requests.

KMS supports only Transport Layer Security (TLS) 1.0 and later versions. KMS does not support SSL 2.0 or SSL 3.0.