New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@cfn-modules/lambda-function

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cfn-modules/lambda-function - npm Package Compare versions

Comparing version
1.2.0
to
1.3.0
test/dummy.zip

Sorry, the diff of this file is not supported yet

+24
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'cfn-modules test'
Parameters:
ContentBucket:
Type: String
ContentKey:
Type: String
Resources:
Layer:
Type: 'AWS::CloudFormation::Stack'
Properties:
Parameters:
ContentBucket: !Ref ContentBucket
ContentKey: !Ref ContentKey
TemplateURL: './node_modules/@cfn-modules/lambda-layer/module.yml'
Function:
Type: 'AWS::CloudFormation::Stack'
Properties:
Parameters:
Handler: 'defaults.handler'
Runtime: 'nodejs8.10'
LayerModule: !GetAtt 'Layer.Outputs.StackName'
TemplateURL: './node_modules/@cfn-modules/lambda-function/module.yml'
+8
-1

@@ -52,2 +52,6 @@ ---

Default: ''
LayerModule:
Description: 'Optional stack name of lambda-layer module.'
Type: String
Default: ''
Description:

@@ -120,2 +124,3 @@ Description: 'Optional description of the function'

HasDeadLetterQueueModule: !Not [!Equals [!Ref DeadLetterQueueModule, '']]
HasLayerModule: !Not [!Equals [!Ref LayerModule, '']]
HasReservedConcurrentExecutions: !Not [!Equals [!Ref ReservedConcurrentExecutions, -1]]

@@ -208,2 +213,4 @@ HasVpcModule: !Not [!Equals [!Ref VpcModule, '']]

- !Ref 'AWS::NoValue'
Layers:
- !If [HasLayerModule, {'Fn::ImportValue': !Sub '${LayerModule}-Arn'}, !Ref 'AWS::NoValue']
ErrorsTooHighAlarm:

@@ -251,3 +258,3 @@ Condition: HasAlertingModule

ModuleVersion:
Value: '1.2.0'
Value: '1.3.0'
StackName:

@@ -254,0 +261,0 @@ Value: !Ref 'AWS::StackName'

+1
-1
{
"name": "@cfn-modules/lambda-function",
"version": "1.2.0",
"version": "1.3.0",
"description": "AWS Lambda function with automated IAM policy generation, encryption, log group and alerting",

@@ -5,0 +5,0 @@ "author": "Michael Wittig <michael@widdix.de>",

@@ -35,2 +35,3 @@ [![Build Status](https://travis-ci.org/cfn-modules/lambda-function.svg?branch=master)](https://travis-ci.org/cfn-modules/lambda-function)

DeadLetterQueueModule: !GetAtt 'Queue.Outputs.StackName' # optional
LayerModule: !GetAtt 'Layer.Outputs.StackName' # optional
Description: '' # optional

@@ -104,2 +105,9 @@ Handler: 'example.handler' # required (file must be in the `lambda-src` folder)

<tr>
<td>LayerModule</td>
<td>Stack name of <a href="https://www.npmjs.com/package/@cfn-modules/lambda-layer">lambda-layer module</a></td>
<td></td>
<td>no</td>
<td></td>
</tr>
<tr>
<td>Description</td>

@@ -106,0 +114,0 @@ <td>description of the function</td>

@@ -6,3 +6,5 @@ {

"ava": "0.25.0",
"@cfn-modules/test": "0.3.0",
"@cfn-modules/test": "0.4.0",
"@cfn-modules/s3-bucket": "1.1.0",
"@cfn-modules/lambda-layer": "1.0.0",
"@cfn-modules/lambda-function": "file:../"

@@ -9,0 +11,0 @@ },

@@ -14,1 +14,30 @@ const test = require('ava');

});
test('lambda-layer', async t => {
const bucketStackName = cfntest.stackName();
const stackName = cfntest.stackName();
const contentKey = 'test.zip';
const dummyFilePath = `${__dirname}/dummy.zip`;
let bucketStackOutputs;
try {
t.log(await cfntest.createStack(`${__dirname}/node_modules/@cfn-modules/s3-bucket/module.yml`, bucketStackName, {Versioning: 'false'}));
bucketStackOutputs = await cfntest.getStackOutputs(bucketStackName);
await cfntest.createObject(bucketStackOutputs.Name, contentKey, dummyFilePath);
t.log(await cfntest.createStack(`${__dirname}/layer.yml`, stackName, {
ContentBucket: bucketStackOutputs.Name,
ContentKey: contentKey
}));
// what could we test here?
} finally {
if (bucketStackOutputs) {
t.log(await cfntest.deleteObject(bucketStackOutputs.Name, contentKey));
}
t.log(await cfntest.deleteStack(stackName));
t.log(await cfntest.deleteStack(bucketStackName));
t.pass();
}
});