POST /#X-Amz-Target=TrentService.CreateCustomKeyStore
Creates a custom key store backed by a key store that you own and manage. When you use a KMS key in a custom key store for a cryptographic operation, the cryptographic operation is actually performed in your key store using your keys. KMS supports CloudHSM key stores backed by an CloudHSM cluster and external key stores backed by an external key store proxy and external key manager outside of Amazon Web Services.
This operation is part of the custom key stores feature in KMS, which combines the convenience and extensive integration of KMS with the isolation and control of a key store that you own and manage.
Before you create the custom key store, the required elements must be in place and operational. We recommend that you use the test tools that KMS provides to verify the configuration your external key store proxy. For details about the required elements and verification tests, see Assemble the prerequisites (for CloudHSM key stores) or Assemble the prerequisites (for external key stores) in the Key Management Service Developer Guide.
To create a custom key store, use the following parameters.
-
To create an CloudHSM key store, specify the
CustomKeyStoreName,CloudHsmClusterId,KeyStorePassword, andTrustAnchorCertificate. TheCustomKeyStoreTypeparameter is optional for CloudHSM key stores. If you include it, set it to the default value,AWS_CLOUDHSM. For help with failures, see Troubleshooting an CloudHSM key store in the Key Management Service Developer Guide. -
To create an external key store, specify the
CustomKeyStoreNameand aCustomKeyStoreTypeofEXTERNAL_KEY_STORE. Also, specify values forXksProxyConnectivity,XksProxyAuthenticationCredential,XksProxyUriEndpoint, andXksProxyUriPath. If yourXksProxyConnectivityvalue isVPC_ENDPOINT_SERVICE, specify theXksProxyVpcEndpointServiceNameparameter. For help with failures, see Troubleshooting an external key store in the Key Management Service Developer Guide.
For external key stores:
Some external key managers provide a simpler method for creating an external key store. For details, see your external key manager documentation.
When creating an external key store in the KMS console, you can upload a JSON-based proxy configuration file with the desired values. You cannot use a proxy configuration with the CreateCustomKeyStore operation. However, you can use the values in the file to help you determine the correct values for the CreateCustomKeyStore parameters.
When the operation completes successfully, it returns the ID of the new custom key store. Before you can use your new custom key store, you need to use the ConnectCustomKeyStore operation to connect a new CloudHSM key store to its CloudHSM cluster, or to connect a new external key store to the external key store proxy for your external key manager. Even if you are not going to use your custom key store immediately, you might want to connect it to verify that all settings are correct and then disconnect it until you are ready to use it.
For help with failures, see Troubleshooting a custom key store in the Key Management Service Developer Guide.
Cross-account use: No. You cannot perform this operation on a custom key store in a different Amazon Web Services account.
Required permissions: kms:CreateCustomKeyStore (IAM policy).
Related operations:
-
ConnectCustomKeyStore
-
DeleteCustomKeyStore
-
DescribeCustomKeyStores
-
DisconnectCustomKeyStore
-
UpdateCustomKeyStore
Servers
- https://kms.{region}.amazonaws.com
- https://kms.{region}.amazonaws.com.cn
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
X-Amz-Content-Sha256 |
String | No | |
X-Amz-Credential |
String | No | |
X-Amz-Target |
String | Yes |
Valid values:
|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
X-Amz-Date |
String | No | |
X-Amz-Algorithm |
String | No | |
X-Amz-SignedHeaders |
String | No | |
X-Amz-Security-Token |
String | No | |
X-Amz-Signature |
String | No |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
XksProxyUriPath |
String | No |
Specifies the base path to the proxy APIs for this external key store. To find this value, see the documentation for your external key store proxy. This parameter is required for all custom key stores with a The value must start with Uniqueness requirements:
|
XksProxyVpcEndpointServiceName |
String | No |
Specifies the name of the Amazon VPC endpoint service for interface endpoints that is used to communicate with your external key store proxy (XKS proxy). This parameter is required when the value of The Amazon VPC endpoint service must fulfill all requirements for use with an external key store. Uniqueness requirements:
|
CloudHsmClusterId |
String | No |
Identifies the CloudHSM cluster for an CloudHSM key store. This parameter is required for custom key stores with Enter the cluster ID of any active CloudHSM cluster that is not already associated with a custom key store. To find the cluster ID, use the DescribeClusters operation. |
XksProxyConnectivity |
String | No |
Indicates how KMS communicates with the external key store proxy. This parameter is required for custom key stores with a If the external key store proxy uses a public endpoint, specify An Amazon VPC endpoint service keeps your communication with KMS in a private address space entirely within Amazon Web Services, but it requires more configuration, including establishing a Amazon VPC with multiple subnets, a VPC endpoint service, a network load balancer, and a verified private DNS name. A public endpoint is simpler to set up, but it might be slower and might not fulfill your security requirements. You might consider testing with a public endpoint, and then establishing a VPC endpoint service for production tasks. Note that this choice does not determine the location of the external key store proxy. Even if you choose a VPC endpoint service, the proxy can be hosted within the VPC or outside of Amazon Web Services such as in your corporate data center. Valid values:
|
CustomKeyStoreType |
String | No |
Specifies the type of custom key store. The default value is For a custom key store backed by an CloudHSM cluster, omit the parameter or enter Valid values:
|
CustomKeyStoreName |
String | Yes |
Specifies a friendly name for the custom key store. The name must be unique in your Amazon Web Services account and Region. This parameter is required for all custom key stores. |
TrustAnchorCertificate |
String | No |
Specifies the certificate for an CloudHSM key store. This parameter is required for custom key stores with a Enter the content of the trust anchor certificate for the CloudHSM cluster. This is the content of the |
KeyStorePassword |
String | No |
Specifies the Enter the password of the The password must be a string of 7 to 32 characters. Its value is case sensitive. This parameter tells KMS the |
XksProxyUriEndpoint |
String | No |
Specifies the endpoint that KMS uses to send requests to the external key store proxy (XKS proxy). This parameter is required for custom key stores with a The protocol must be HTTPS. KMS communicates on port 443. Do not specify the port in the For external key stores with For external key stores with The value of this parameter must begin with Uniqueness requirements:
|
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.