cfn-lambda | CloudFormation custom resource helper for Lambda Node.js | Cloud Functions library

 by   andrew-templeton JavaScript Version: 5.1.0 License: MIT

kandi X-RAY | cfn-lambda Summary

kandi X-RAY | cfn-lambda Summary

cfn-lambda is a JavaScript library typically used in Serverless, Cloud Functions, Nodejs applications. cfn-lambda has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i cfn-lambda' or download it from GitHub, npm.

CloudFormation custom resource helper for Lambda Node.js runtime
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              cfn-lambda has a low active ecosystem.
              It has 71 star(s) with 19 fork(s). There are 7 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 6 open issues and 11 have been closed. On average issues are closed in 135 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of cfn-lambda is 5.1.0

            kandi-Quality Quality

              cfn-lambda has 0 bugs and 0 code smells.

            kandi-Security Security

              cfn-lambda has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              cfn-lambda code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              cfn-lambda is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              cfn-lambda releases are not available. You will need to build from source code and install.
              Deployable package is available in npm.
              Installation instructions are not available. Examples and code snippets are available.
              It has 87 lines of code, 0 functions and 21 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed cfn-lambda and discovered the below as its top functions. This is intended to give you an instant insight into cfn-lambda implemented functionality, and help decide if they suit your requirements.
            • Create a new resource bundle .
            • Factory to create new functions
            • Check for composite ID
            • Check the composite resource .
            • Function to check the creation of the composite resource .
            • send http response to server
            • trigger and invoke the response
            • Updates the composite resource structure .
            • The composite resource class
            • Build a function that will return the result .
            Get all kandi verified functions for this library.

            cfn-lambda Key Features

            No Key Features are available at this moment for cfn-lambda.

            cfn-lambda Examples and Code Snippets

            No Code Snippets are available at this moment for cfn-lambda.

            Community Discussions

            QUESTION

            How to get arn of AWS Api gateway when deploying with cloudformation
            Asked 2022-Jan-16 at 19:47

            I am trying to deploy a function and aws api gateway using cloudformation. In LambdaPermission resource there is a property which is SourceArn and it expects the ARN of the resource that will invoke the function, in this case it will be api gateway. Now ApiGateway resource does not provide the output value of arn. So my question is how we can access it?

            here is the resource of Lambda Permission where I need to put the value in sourcearn.

            ...

            ANSWER

            Answered 2022-Jan-16 at 19:47

            QUESTION

            Cloudformation Elasticbeanstalk specify target group for shared load balancer
            Asked 2021-May-01 at 14:34

            I have two Cloudformation templates

            • one which creates a VPC, ALB and any other shared resources etc.
            • one which creates an elastic beanstalk environment and relevant listener rules to direct traffic to this environment using the imported shared load balancer (call this template Environment)

            The problem I'm facing is the Environment template creates a AWS::ElasticBeanstalk::Environment which subsequently creates a new CFN stack which contains things such as the ASG, and Target Group (or process as it is known to elastic beanstalk). These resources are not outputs of the AWS owned CFN template used to create the environment.

            When setting

            ...

            ANSWER

            Answered 2021-Apr-30 at 01:10

            I don't have access as far as I can tell to the ARN of the target group created by the elastic beanstalk environment resource

            That's true. The way to overcome this is through custom resource. In fact I developed fully working, very similar resource for one of my previous answers, thus you can have a look at it and adopt to your templates. The resource returns ARN of the EB load balancer, but you could modify it to get the ARN of EB's target group instead.

            Source https://stackoverflow.com/questions/67322501

            QUESTION

            Unable to execute AWS Pipeline Error: "An error occurred (AccessDenied) when calling the PutObject operation: Access Denied"
            Asked 2020-Aug-31 at 09:05

            Have been trying to setup an AWS pipeline following the tutorial here: https://docs.aws.amazon.com/lambda/latest/dg/build-pipeline.html

            But the pipeline continously fails with below error logs:

            Here are some of the actions, I tried already:

            1. Granted full access of S3 to "cfn-lambda-pipeline" role associated with Cloud Formation and Code Pipeline Service Role.

            1. Allowed public ACL access to S3 bucket.

            Below is my buildspec.yml

            ...

            ANSWER

            Answered 2020-Aug-31 at 09:05

            "cfn-lambda-pipeline" role associated with Cloud Formation and Code Pipeline Service Role.

            The S3 permissions should be associated with CodeBuild (CB), because CB is going to run buildspec.yml. Thus CB needs to be able to access the S3.

            According to the tutorial linked in the Update the build stage role section, the AmazonS3FullAccess should be added to codebuild-lamba-pipeline-build-service-role role, not to cfn-lambda-pipeline nor CodePipeline's role.

            Source https://stackoverflow.com/questions/63667602

            QUESTION

            Confusing parameter for cloudFormation script
            Asked 2020-Jun-20 at 12:15

            Hello i am planning to run the cloudFormation stack that is preconfigured by aws here. It prompts me to fill out

            • NeptuneBulkloadIAMRoleArn
            • NeptuneClusterEndpoint
            • NeptuneLambdaIAMRoleArn

            But i don't know what to fill in there, can you help me out?

            ...

            ANSWER

            Answered 2020-Jun-20 at 12:15

            The parameters you described above are used for the following:

            • NeptuneBulkloadIAMRoleArn - This is an IAM role setup to run the loader command. Instructions for setting this up found here.
            • NeptuneClusterEndpoint - This is the endpoint of your Neptune database, it will be accessible either from the console or the CLI.
            • NeptuneLambdaIAMRoleArn - This allows you to pass in your own role the Lambda should use, if not specified the CloudFormation stack should make one for you.

            Source https://stackoverflow.com/questions/62485574

            QUESTION

            ParallelizationFactor in kinesis event source mapping
            Asked 2020-May-14 at 15:07

            I'm looking to connect a Kinesis stream to a Lambda function via event source mapping, want to set the parallelization-factor value to any value between 1- 10 as suggested in the documention:

            https://docs.aws.amazon.com/cli/latest/reference/lambda/create-event-source-mapping.html

            https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition

            and an example at https://aws.amazon.com/blogs/compute/new-aws-lambda-scaling-controls-for-kinesis-and-dynamodb-event-sources/

            The following command results in an error:

            ...

            ANSWER

            Answered 2020-May-14 at 15:07

            Check the version of AWS CLI your using, because i can find the --parallelization-factor option when i tried the below command

            aws lambda create-event-source-mapping help

            This is version i'm using

            Source https://stackoverflow.com/questions/61799135

            QUESTION

            How to connect a CloudFormation Template with a Lambda Function that creates a new database on an Aurora PostgreSQL Instance in RDS?
            Asked 2020-Mar-03 at 15:46

            I hope you can help!

            Goal

            I am trying to configure the following szenario on AWS:

            1. In AWC CLI: Call CloudFormation Template to create a new stack.
            2. In Template: Call Lambda Function.
            3. In Lambda Function: Connect to Aurora PostgreSQL Instance in RDS via pg module.
            4. In PostgresSQL: Create a new database.

            Short story

            As soon as I add my Lambda Function to the default VPC it is not able anymore to send a response back to CloudFormation and the stack gets stuck in CREATE_IN_PROGRESS. It works when I delete the VPC from the configuration of the Lambda function. But then I can not connect to another component like the RDS database instance anymore. How to deal with this?

            Long story

            To make it work my first step was to manually connect to PostgreSQL and create a new database:

            1. Configured the Default Security Group to allow ALL Inbound and ALL Outbound traffic. No worries, only for testing. I will change that later.
            2. Added the Security Group to the RDS Instance to accept traffic from and to other components within the same VPC. Necessary for step 3.
            3. Created a Cloud9 Environment to have access to a terminal in the VPC. Connecting to the PostgreSQL Database and creating a database works!

            Now my goal was to create a new database via a Lambda function:

            1. Manually created a new Lambda Function including a new role with basic Lambda authorization. Also added AdministratorAccess to the role. No worries, again only for testing. The Lambda function runs on Node.js 12.x with a 15 seconds timeout.
            2. Packed my Lambda script and the pg module in a zip File and uploaded it. The script looks like this:
            ...

            ANSWER

            Answered 2020-Mar-03 at 15:46

            The code you posted is a simple Lambda, and doesn't report its status as required by a CloudFormation custom resource. So first step is to ensure that you're following the requirements.

            If you are, and your code is getting blocked when reporting status back to S3, then the most likely cause is that you're running in a subnet that has neither a NAT nor an S3 endpoint. If you don't otherwise need a NAT, the S3 endpoint is free so would be the best solution. If you do already have a NAT, ensure that the Lambda runs in a subnet where the NAT is available.

            Source https://stackoverflow.com/questions/60510499

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install cfn-lambda

            You can install using 'npm i cfn-lambda' or download it from GitHub, npm.

            Support

            Hey you! Are you an AWS automation engineer? I'd love if you'd author open-source resources with this tool. Just submit a PR to this page for a specific tag on your repository, and I'll review it and add it to the page. Furthermore, if you want to help style the generated HTML in the launcher pages, I'd love help with that too :).
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i cfn-lambda

          • CLONE
          • HTTPS

            https://github.com/andrew-templeton/cfn-lambda.git

          • CLI

            gh repo clone andrew-templeton/cfn-lambda

          • sshUrl

            git@github.com:andrew-templeton/cfn-lambda.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Cloud Functions Libraries

            Try Top Libraries by andrew-templeton

            bottie

            by andrew-templetonJavaScript

            cfn-lex-bot

            by andrew-templetonJavaScript

            vaxxie

            by andrew-templetonJavaScript

            cfn-cloudwatch-events-rule

            by andrew-templetonJavaScript

            cfn-lex-intent

            by andrew-templetonJavaScript