Skip to main content

B.AwsCfResponse

A python based library to send response back to AWS Cloud Formation service after processing of custom resource request.

Description

Sometimes a necessity to write custom AWS resource provisioning logic arises. After processing of custom resource requests, a resource provider must send the standardized response back to AWS CloudFormation service. This package makes a response message from a custom resource provider event and sends a callback to AWS CloudFormation service.

Remarks

Biomapas aims to modernize life-science industry by sharing its IT knowledge with other companies and the community. This is an open source library intended to be used by anyone. Improvements and pull requests are welcome.

Related technology

  • Python 3
  • AWS CloudFormation

Assumptions

The project assumes the following:

  • You have basic-good knowledge in python programming.
  • You have basic-good knowledge in AWS and CloudFormation.

Useful sources

Install

The project is built and uploaded to PyPi. Install it by using pip.

pip install b-aws-cf-response

Or directly install it through source.

pip install .

Usage & Examples

Create CfResponse object using event and context of custom resource provider:

from b_aws_cf_response.cfresponse import CfResponse

response = CfResponse(event, context)

After successful provision of custom resource, initiate SUCCESS response. The response can include data from the custom resource provider. For example, created resource name.

# Custom resource provider defined name-value pairs to send with response.
custom_resource_data = {
  'IndexName': 'opensearch-index-name'
}

response.respond(
  status=CfResponse.CfResponseStatus.SUCCESS,
  data=custom_resource_data,
  resource_id=custom_resource_id
)

Initiate FAILED response if custom resource provisioning failed.

response.respond(
  status=CfResponse.CfResponseStatus.FAILED,
  status_reason=error_message
)

Testing

The project has tests that can be run. Simply run:

pytest

Contribution

Found a bug? Want to add or suggest a new feature?
Contributions of any kind are gladly welcome. You may contact us directly, create a pull-request or an issue in github platform. Lets modernize the world together.

Release history

0.0.2

  • Update of Usage & Examples.

0.0.1

  • Initial build.

Metadata

Release files for b-aws-cf-response 0.0.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 b-aws-cf-response 0.0.2
File Size Uploaded Provenance
b_aws_cf_response-0.0.2.tar.gz 8.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for b-aws-cf-response 0.0.2
File Interpreter ABI Platform
b_aws_cf_response-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 18.4 kB

Release files / b_aws_cf_response-0.0.2.tar.gz

Download URL b_aws_cf_response-0.0.2.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fd7e319b7a5ab440ad49230ee0f41f42312037eab68a995b177ccff1678eec90
BLAKE2b-256 checksum
How to use checksums
b59d7e3f841dd2c116c802fe8cb50ea528f5dcc1c765870ae56384ac01abb2a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / b_aws_cf_response-0.0.2-py3-none-any.whl

Download URL b_aws_cf_response-0.0.2-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ac863d7198e28dd6373c9c937bf016b918141f1ec61831cdc35ff44e18da2cb
BLAKE2b-256 checksum
How to use checksums
32543c7e3ec8911c61d480719124c770211abf21b0ad78706f8a486594607e40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Security for b-aws-cf-response 0.0.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.

Release history Release notifications | RSS feed

This release

0.0.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