Skip to main content

p6-barrier

Project description

P6Barrier is an AWS CDK Construct that deploys a Custom Resource which will poll until AWS Lambda Function isReady returns true. Ideal for running code AFTER an RDS or EKS is ready.

P6Barrier

Badges

License Gitpod ready-to-code Build Release Mergify codecov Known Vulnerabilities

Distributions

npm version PyPI version NuGet version Maven Central

Summary

Use this to wait for an RDS or for that matter anything to become ready.

This deploys a Custom Resource which is obviously backed by an AWS Lambda. This lambda calls the lambda with Arn functionArn.

This function should return the string 'True' if the resource is ready. Otherwise 'False'. This function must be provided by you and is custom for your needs.

This is abstracted from @aws-cdk/aws-eks/cluster.ts where a Custom Resource which makes an SSM Parameter is used as a barrier for Resources to depend on until the EKS Cluster is ready for Helm to be run via an addHelmChart

Usage

Example 1 - External Lambda

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from p6_barrier import P6Barrier

P6Barrier(self, "p6-barrier",
    name="some_useful_name",
    dependencies=[dep1, dep2],
    function_arn="functionArn"
)

Example 2 - CDK Lambda (same stack)

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from p6_barrier import P6Barrier

is_ready = lambdajs.NodejsFunction(self, "isReady",
    timeout=Duration.minutes(15),
    tracing=lambda_.Tracing.ACTIVE
)

P6Barrier(self, "p6-barrier",
    name="some_useful_name",
    dependencies=[dep1, dep2],
    function_arn=is_ready.function_arn
)

Contributing

Code of Conduct

Changes

Authors

Philip M. Gollucci pgollucci@p6m7g8.com

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

p6-barrier-0.1.107.tar.gz (8.1 MB view details)

Uploaded Source

Built Distribution

p6_barrier-0.1.107-py3-none-any.whl (8.1 MB view details)

Uploaded Python 3

File details

Details for the file p6-barrier-0.1.107.tar.gz.

File metadata

  • Download URL: p6-barrier-0.1.107.tar.gz
  • Upload date:
  • Size: 8.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for p6-barrier-0.1.107.tar.gz
Algorithm Hash digest
SHA256 28e466be41bbb14c871935bb47687e89d22cc6688dc9ba196befe5aff30527ab
MD5 7e123e97deb83c1e38b41a3cc3ca1cc1
BLAKE2b-256 c281bd92ebbcc16c59af4369964925b3f077463915a39a2c9f172206e26446ef

See more details on using hashes here.

File details

Details for the file p6_barrier-0.1.107-py3-none-any.whl.

File metadata

  • Download URL: p6_barrier-0.1.107-py3-none-any.whl
  • Upload date:
  • Size: 8.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.9

File hashes

Hashes for p6_barrier-0.1.107-py3-none-any.whl
Algorithm Hash digest
SHA256 0f9fafe683612fb6e87a4fedd5026cb4e289a1c9cacc44cec1345ad09c4090b5
MD5 9b505b4f690be1c2f04b6a8a64b7ef39
BLAKE2b-256 16e7f4f8f84f618c751684cf3fd08bbe18ab814bbd927231271e7cc969ede420

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page