Skip to main content

@reapit-cdk/replicated-key

npm version npm downloads coverage: 99.02%25 Integ Tests: ✔

Creates a KMS key and replicates it to the desired regions. Useful when replicating secrets across regions.

Package Installation:

yarn add --dev @reapit-cdk/replicated-key
# or
npm install @reapit-cdk/replicated-key --save-dev

Usage

import { Stack, App } from 'aws-cdk-lib'
import { ReplicatedKey } from '@reapit-cdk/replicated-key'
import { Code, Function, Runtime } from 'aws-cdk-lib/aws-lambda'

const app = new App()
const stack = new Stack(app, 'stack-name', {
  env: {
    region: 'us-east-1', // region must be specified
  },
})
const key = new ReplicatedKey(stack, 'key', {
  replicaRegions: ['af-south-1', 'cn-north-1'],
})

const lambda = new Function(stack, 'lambda', {
  runtime: Runtime.NODEJS_18_X,
  handler: 'lambda.handler',
  code: Code.fromInline('export const handler = () => {}'),
  environment: {
    usKeyArn: key.getRegionalKey('us-east-1').keyArn,
    afKeyArn: key.getRegionalKey('af-south-1').keyArn,
    cnKeyArn: key.getRegionalKey('cn-north-1').keyArn,
  },
})

key.grantEncryptDecrypt(lambda)

Metadata

Release files for reapit-cdk.replicated-key 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reapit-cdk.replicated-key 0.1.2
File Size Uploaded Provenance Actions
reapit-cdk.replicated-key-0.1.2.tar.gz 119.9 kB Without provenance Details for reapit-cdk.replicated-key-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reapit-cdk.replicated-key 0.1.2
File Interpreter ABI Platform Actions
reapit_cdk.replicated_key-0.1.2-py3-none-any.whl Python 3 none any Details for reapit_cdk.replicated_key-0.1.2-py3-none-any.whl

Total release size: 238.7 kB

Release files / reapit-cdk.replicated-key-0.1.2.tar.gz

Download URL reapit-cdk.replicated-key-0.1.2.tar.gz
Size 119.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e26a7b429bcce576bfabde154bbe7bb3cdc5edf6e92ce7e1589b5846d5d5883e
BLAKE2b-256 checksum
How to use checksums
1f63fe53c678f5972ba69e65365bfa0baf4deedd88667f2f82823163f428b457
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Release files / reapit_cdk.replicated_key-0.1.2-py3-none-any.whl

Download URL reapit_cdk.replicated_key-0.1.2-py3-none-any.whl
Size 118.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f623697c243f07e0d979c3e4f088d66db29609f44c69e5c9fcbec15b5bd982a
BLAKE2b-256 checksum
How to use checksums
947753f151067572bf362aaf37dd8b8628653456940ad40dfaf9efc4e060b343
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.12

Security for reapit-cdk.replicated-key 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page