Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Skip to main content
Represents a symmetric key used for cryptographic operations. Symmetric keys are typically generated using a SymmetricKeyBuilder. This class also provides methods to export and check the properties of symmetric keys.

Extends

  • BaseCryptoClass

Accessors

exportable

Get Signature

get exportable(): boolean Check whether the key is exportable or not.
Returns
boolean true if the key is exportable, false otherwise.

purposes

Get Signature

get purposes(): KeyPurpose[] Get the purposes enabled for this key.
Returns
KeyPurpose[] An array with the purposes enabled for this key.

Methods

exportRaw()

exportRaw(): Promise<ArrayBuffer> Export the symmetric key as raw bytes. This method should only be called on keys that are marked as exportable.

Returns

Promise<ArrayBuffer> A promise that resolves to the raw key bytes.

Throws

AccessDeniedError If the key is not exportable.
Last modified on October 2, 2025