cfn-lambda | CloudFormation custom resource helper for Lambda Node.js | Cloud Functions library
kandi X-RAY | cfn-lambda Summary
kandi X-RAY | cfn-lambda Summary
CloudFormation custom resource helper for Lambda Node.js runtime
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- 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 .
cfn-lambda Key Features
cfn-lambda Examples and Code Snippets
Community Discussions
Trending Discussions on cfn-lambda
QUESTION
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:47The format:
QUESTION
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:10I 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.
QUESTION
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:
- Granted full access of S3 to "cfn-lambda-pipeline" role associated with Cloud Formation and Code Pipeline Service Role.
- 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.
QUESTION
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:15The 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.
QUESTION
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
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:07Check 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
QUESTION
I hope you can help!
Goal
I am trying to configure the following szenario on AWS:
- In AWC CLI: Call CloudFormation Template to create a new stack.
- In Template: Call Lambda Function.
- In Lambda Function: Connect to Aurora PostgreSQL Instance in RDS via pg module.
- 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:
- Configured the Default Security Group to allow ALL Inbound and ALL Outbound traffic. No worries, only for testing. I will change that later.
- Added the Security Group to the RDS Instance to accept traffic from and to other components within the same VPC. Necessary for step 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:
- 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. - 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:46The 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.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cfn-lambda
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page