Skip to main content

@reapit-cdk/replicated-secret

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

Creates a Secret and replicates it across the given regions. Requires a ReplicatedKey be passed in.

Package Installation:

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

Usage

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

const app = new App()
const stack = new Stack(app, 'stack-name', {
  env: {
    region: 'us-east-1', // region must be specified
  },
})
const replicatedKey = new ReplicatedKey(stack, 'key', {
  replicaRegions: ['af-south-1', 'cn-north-1'],
})
const replicatedSecret = new ReplicatedSecret(stack, 'secret', {
  replicaRegions: ['af-south-1', 'cn-north-1'],
  replicatedKey,
})
const lambda = new Function(stack, 'lambda', {
  runtime: Runtime.NODEJS_18_X,
  handler: 'lambda.handler',
  code: Code.fromInline('export const handler = () => {}'),
  environment: {
    usSecretArn: replicatedSecret.getRegionalSecret('us-east-1').secretArn,
    afSecretArn: replicatedSecret.getRegionalSecret('af-south-1').secretArn,
    cnSecretArn: replicatedSecret.getRegionalSecret('cn-north-1').secretArn,
  },
})
replicatedSecret.grantWrite(lambda)

Metadata

Release files for reapit-cdk.replicated-secret 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-secret 0.1.2
File Size Uploaded Provenance Actions
reapit-cdk.replicated-secret-0.1.2.tar.gz 118.9 kB Without provenance Details for reapit-cdk.replicated-secret-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 236.6 kB

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

Download URL reapit-cdk.replicated-secret-0.1.2.tar.gz
Size 118.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3666179bbe7149a8bcf9370e1cb221fa7d58c2db0ef767641d60b62ac7dedc97
BLAKE2b-256 checksum
How to use checksums
9741728f1a13e3b184f554f8458a0464d7082cdd45f42170d4802e0adfe25abc
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_secret-0.1.2-py3-none-any.whl

Download URL reapit_cdk.replicated_secret-0.1.2-py3-none-any.whl
Size 117.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f378b34c339d75b2cba1e01c8451c5dfb9dacf0e6299c6860f73561c974c1b72
BLAKE2b-256 checksum
How to use checksums
b89c806c2852e2ec533952cef269bc5e6f62491c9c5a9b4a8c1dd336b48c39b9
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-secret 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