Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@awboost/cfntypes

Package Overview
Dependencies
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@awboost/cfntypes

Thanks for using my work! Please don't use the `v1.0.0-beta` versions right now, things are rapidly and wildly changing as I prototype other libraries in the suite. You can use `v0.*` versions but I don't intend to support this. Star the repo to keep up t

  • 1.0.0-beta.64
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
620
increased by2.99%
Maintainers
1
Weekly downloads
 
Created
Source

🚧 Warning, unstable!

Thanks for using my work! Please don't use the v1.0.0-beta versions right now, things are rapidly and wildly changing as I prototype other libraries in the suite. You can use v0.* versions but I don't intend to support this. Star the repo to keep up to date with new releases.

@awboost/cfntypes

Typescript types for AWS CloudFormation types.

Template Types

The template types are available via the template package subpath. For performance reasons, the resources are not fully typed, i.e. no type-checking is done for valid Type or Properties values.

import { Template } from "@awboost/cfntypes/template";

const template: Template = {
  Resources: {
    MyFunction: {
      Type: "AWS::Lambda::Function",
      Properties: {
        // omitted for brevity
      },
    },
  },
};

Resource Types

Instead, the accurate resource types can be imported from the resources/* package subpath.

import { LambdaFunction } from "@awboost/cfntypes/resources/AWS-Lambda";
import { Template } from "@awboost/cfntypes/template";

const template: Template = {
  Resources: {
    MyFunction: new LambdaFunction("MyFunction", {
      // props go here
    }).toJSON(),
  },
};

The attributes of the resource can be conveniently accessed in the resource instance.

const instance = new LambdaFunction("MyFunction", {
  // props
}).addToTemplate(template);

// all of the attributes are available via the attributes property.
// this property actually returns { "Fn::GetAtt": [...] } intrinsic function.
const arn = instance.attributes.Arn;

FAQs

Package last updated on 13 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc