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

@aws-cdk/aws-lambda

Package Overview
Dependencies
Maintainers
4
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-lambda - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

26

lib/lambda.d.ts

@@ -10,2 +10,21 @@ import ec2 = require('@aws-cdk/aws-ec2');

import { Runtime } from './runtime';
/**
* X-Ray Tracing Modes (https://docs.aws.amazon.com/lambda/latest/dg/API_TracingConfig.html)
*/
export declare enum Tracing {
/**
* Lambda will respect any tracing header it receives from an upstream service.
* If no tracing header is received, Lambda will call X-Ray for a tracing decision.
*/
Active = 0,
/**
* Lambda will only trace the request from an upstream service
* if it contains a tracing header with "sampled=1"
*/
PassThrough = 1,
/**
* Lambda will not trace any request.
*/
Disabled = 2
}
export interface FunctionProps {

@@ -125,2 +144,8 @@ /**

deadLetterQueue?: sqs.QueueRef;
/**
* Enable AWS X-Ray Tracing for Lambda Function.
*
* @default undefined X-Ray tracing disabled
*/
tracing?: Tracing;
}

@@ -198,2 +223,3 @@ /**

private buildDeadLetterConfig;
private buildTracingConfig;
}

34

lib/lambda.js

@@ -11,2 +11,22 @@ "use strict";

/**
* X-Ray Tracing Modes (https://docs.aws.amazon.com/lambda/latest/dg/API_TracingConfig.html)
*/
var Tracing;
(function (Tracing) {
/**
* Lambda will respect any tracing header it receives from an upstream service.
* If no tracing header is received, Lambda will call X-Ray for a tracing decision.
*/
Tracing[Tracing["Active"] = 0] = "Active";
/**
* Lambda will only trace the request from an upstream service
* if it contains a tracing header with "sampled=1"
*/
Tracing[Tracing["PassThrough"] = 1] = "PassThrough";
/**
* Lambda will not trace any request.
*/
Tracing[Tracing["Disabled"] = 2] = "Disabled";
})(Tracing = exports.Tracing || (exports.Tracing = {}));
/**
* Deploys a file from from inside the construct library as a function.

@@ -53,2 +73,3 @@ *

deadLetterConfig: this.buildDeadLetterConfig(props),
tracingConfig: this.buildTracingConfig(props)
});

@@ -155,4 +176,15 @@ resource.addDependency(this.role);

}
buildTracingConfig(props) {
if (props.tracing === undefined || props.tracing === Tracing.Disabled) {
return undefined;
}
this.addToRolePolicy(new cdk.PolicyStatement()
.addActions('xray:PutTraceSegments', 'xray:PutTelemetryRecords')
.addAllResources());
return {
mode: Tracing[props.tracing]
};
}
}
exports.Function = Function;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFtYmRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsibGFtYmRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsd0NBQXlDO0FBQ3pDLHdDQUF5QztBQUN6Qyx3Q0FBeUM7QUFDekMsb0NBQXFDO0FBRXJDLDZDQUEyQztBQUMzQyxxREFBbUQ7QUFDbkQseURBQStFO0FBbUkvRTs7Ozs7Ozs7OztHQVVHO0FBQ0gsTUFBYSxRQUFTLFNBQVEsd0JBQVc7SUFpQ3JDLFlBQVksTUFBcUIsRUFBRSxJQUFZLEVBQUUsS0FBb0I7UUFDakUsS0FBSyxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsQ0FBQztRQVJMLHlCQUFvQixHQUFHLElBQUksQ0FBQztRQVUzQyxJQUFJLENBQUMsV0FBVyxHQUFHLEtBQUssQ0FBQyxXQUFXLElBQUksRUFBRyxDQUFDO1FBRTVDLE1BQU0saUJBQWlCLEdBQUcsSUFBSSxLQUFLLEVBQVcsQ0FBQztRQUUvQywrRkFBK0Y7UUFDL0YsaUJBQWlCLENBQUMsSUFBSSxDQUFDLElBQUksR0FBRyxDQUFDLGdCQUFnQixDQUFDLDBDQUEwQyxDQUFDLENBQUMsU0FBUyxDQUFDLENBQUM7UUFFdkcsSUFBSSxLQUFLLENBQUMsR0FBRyxFQUFFO1lBQ1gsaURBQWlEO1lBQ2pELGlCQUFpQixDQUFDLElBQUksQ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b3BzKSB7XG4gICAgICAgIGlmIChwcm9wcy50cmFjaW5nID09PSB1bmRlZmluZWQgfHwgcHJvcHMudHJhY2luZyA9PT0gVHJhY2luZy5EaXNhYmxlZCkge1xuICAgICAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuYWRkVG9Sb2xlUG9saWN5KG5ldyBjZGsuUG9saWN5U3RhdGVtZW50KClcbiAgICAgICAgICAgIC5hZGRBY3Rpb25zKCd4cmF5OlB1dFRyYWNlU2VnbWVudHMnLCAneHJheTpQdXRUZWxlbWV0cnlSZWNvcmRzJylcbiAgICAgICAgICAgIC5hZGRBbGxSZXNvdXJjZXMoKSk7XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIG1vZGU6IFRyYWNpbmdbcHJvcHMudHJhY2luZ11cbiAgICAgICAgfTtcbiAgICB9XG5cbn1cbiJdfQ==

36

package.json
{
"name": "@aws-cdk/aws-lambda",
"version": "0.9.0",
"version": "0.9.1",
"description": "CDK Constructs for AWS Lambda",

@@ -58,23 +58,23 @@ "main": "lib/index.js",

"devDependencies": {
"@aws-cdk/assert": "^0.9.0",
"cdk-build-tools": "^0.9.0",
"cdk-integ-tools": "^0.9.0",
"cfn2ts": "^0.9.0",
"pkglint": "^0.9.0"
"@aws-cdk/assert": "^0.9.1",
"cdk-build-tools": "^0.9.1",
"cdk-integ-tools": "^0.9.1",
"cfn2ts": "^0.9.1",
"pkglint": "^0.9.1"
},
"dependencies": {
"@aws-cdk/assets": "^0.9.0",
"@aws-cdk/aws-cloudwatch": "^0.9.0",
"@aws-cdk/aws-codepipeline-api": "^0.9.0",
"@aws-cdk/aws-ec2": "^0.9.0",
"@aws-cdk/aws-events": "^0.9.0",
"@aws-cdk/aws-iam": "^0.9.0",
"@aws-cdk/aws-logs": "^0.9.0",
"@aws-cdk/aws-s3": "^0.9.0",
"@aws-cdk/aws-s3-notifications": "^0.9.0",
"@aws-cdk/aws-sqs": "^0.9.0",
"@aws-cdk/cdk": "^0.9.0",
"@aws-cdk/cx-api": "^0.9.0"
"@aws-cdk/assets": "^0.9.1",
"@aws-cdk/aws-cloudwatch": "^0.9.1",
"@aws-cdk/aws-codepipeline-api": "^0.9.1",
"@aws-cdk/aws-ec2": "^0.9.1",
"@aws-cdk/aws-events": "^0.9.1",
"@aws-cdk/aws-iam": "^0.9.1",
"@aws-cdk/aws-logs": "^0.9.1",
"@aws-cdk/aws-s3": "^0.9.1",
"@aws-cdk/aws-s3-notifications": "^0.9.1",
"@aws-cdk/aws-sqs": "^0.9.1",
"@aws-cdk/cdk": "^0.9.1",
"@aws-cdk/cx-api": "^0.9.1"
},
"homepage": "https://github.com/awslabs/aws-cdk"
}

@@ -78,1 +78,16 @@ ## AWS Lambda Construct Library

to learn more about AWS Lambdas and DLQs.
### Lambda with X-Ray Tracing
```ts
import lambda = require('@aws-cdk/aws-lambda');
const fn = new lambda.Function(this, 'MyFunction', {
runtime: lambda.Runtime.NodeJS810,
handler: 'index.handler'
code: lambda.Code.inline('exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }'),
tracing: lambda.Tracing.Active
});
```
See [the AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html)
to learn more about AWS Lambda's X-Ray support.

@@ -22,3 +22,6 @@ import { Test } from 'nodeunit';

'error when default function with SQS DLQ when client provides Queue to be used as DLQ and deadLetterQueueEnabled set to false'(test: Test): void;
'default function with Active tracing'(test: Test): void;
'default function with PassThrough tracing'(test: Test): void;
'default function with Disabled tracing'(test: Test): void;
};
export = _default;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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