Skip to content
v2.274.0

KeyValueStoreProps Struct ​

The properties to create a Key Value Store.

Example ​

ts
const storeAsset = new cloudfront.KeyValueStore(this, 'KeyValueStoreAsset', {
  keyValueStoreName: 'KeyValueStoreAsset',
  source: cloudfront.ImportSource.fromAsset('path-to-data.json'),
});

const storeInline = new cloudfront.KeyValueStore(this, 'KeyValueStoreInline', {
  keyValueStoreName: 'KeyValueStoreInline',
  source: cloudfront.ImportSource.fromInline(JSON.stringify({
    data: [
      {
        key: "key1",
        value: "value1",
      },
      {
        key: "key2",
        value: "value2",
      },
    ],
  })),
});

Properties ​

commentoptionalstringcommentoptionalstrcommentoptionalStringCommentoptionalstringCommentoptional*string#
A comment for the Key Value Store.

Default: No comment will be specified

keyValueStoreNameoptionalstringkey_value_store_nameoptionalstrkeyValueStoreNameoptionalStringKeyValueStoreNameoptionalstringKeyValueStoreNameoptional*string#
The unique name of the Key Value Store.

Default: A generated name

sourceoptionalImportSourcesourceoptionalImportSourcesourceoptionalImportSourceSourceoptionalImportSourceSourceoptionalImportSource#
The import source for the Key Value Store.

Default: No data will be imported to the store

This will populate the initial items in the Key Value Store. The source data must be in a valid JSON format.