Namespace Pollution Mechanism

    cfn-lex-bot

    1.0.3 • Public • Published

    cfn-lex-bot

    Purpose

    AWS CloudFormation does not support Amazon Lex / AWS Lex. This is a Lambda-backed custom resource to add support for AWS Lex Bots to CloudFormation.

    This package on NPM
    This package on GitHub

    Implementation

    This Lambda makes use of the Lambda-Backed CloudFormation Custom Resource flow module, cfn-lambda (GitHub / NPM).

    Installation

    This package uses cfn-lambda (GitHub / NPM) Launcher Pages, so you can install this in your AWS Account without downloading anything! Just visit my (the maintainer) Launch Page and click Launch on the us-east-1 region. It only supports installation in the us-east-1 region right now, since that's the only AWS region Amazon Lex is supported in right now.

    Maintainer's Launcher Page

    After using this Launch Page, your CloudFormation templates will have access to Custom::LexBot resources as long as you add ServiceToken to the Properties for the resource and use it like in the example template. The ServiceToken is available to you in the Outputs of the CloudFormation Stack the Launch Page link creates.

    Furthermore, you can simply Fn::ImportValue the installed ServiceToken Lambda ARN using:

      "Fn::ImportValue": "cfn-lex-bot-1-0-3-ServiceToken"
    

    If you clone this repo and run npm run deploy, it will do the same thing / install the same way that clicking on the Launch link will.

    You can then deploy the example template included in this module: Example Template for Custom::LexBot.

    After you do, verify the slot exists in the Amazon Lex Console Bot view!

    Usage

    See ./example.template.json for a sample CloudFormation template. The example uses Parameters and dynamic ServiceToken ingestion using Fn::ImportValue fully.

    The Properties exactly follow the API endpoint parameter structure the nodejs SDK uses. The method can be found in the AWS docs here

    Miscellaneous

    Collaboration & Requests

    Submit pull requests or tweet @ayetempleton if you want to get involved with roadmap as well, or if you want to do this for a living :)

    License

    MIT

    Want More CloudFormation?

    Work is (extremely) active, published here:
    Andrew's NPM Account

    Install

    npm i cfn-lex-bot

    DownloadsWeekly Downloads

    2

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • andrew-templeton