@aws-cdk/aws-lambda
Advanced tools
Comparing version 0.28.0 to 0.29.0
import cloudwatch = require('@aws-cdk/aws-cloudwatch'); | ||
import cdk = require('@aws-cdk/cdk'); | ||
import { Construct } from '@aws-cdk/cdk'; | ||
import { FunctionBase, FunctionImportProps } from './function-base'; | ||
@@ -49,2 +49,6 @@ import { Version } from './lambda-version'; | ||
/** | ||
* Name of this alias. | ||
*/ | ||
readonly aliasName: string; | ||
/** | ||
* ARN of this alias | ||
@@ -68,3 +72,3 @@ * | ||
private readonly underlyingLambda; | ||
constructor(scope: cdk.Construct, id: string, props: AliasProps); | ||
constructor(scope: Construct, id: string, props: AliasProps); | ||
/** | ||
@@ -75,3 +79,3 @@ * Role associated with this alias | ||
readonly grantPrincipal: import("@aws-cdk/aws-iam").IPrincipal; | ||
metric(metricName: string, props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
export(): FunctionImportProps; | ||
@@ -78,0 +82,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const cdk = require("@aws-cdk/cdk"); | ||
const cdk_1 = require("@aws-cdk/cdk"); | ||
const function_base_1 = require("./function-base"); | ||
@@ -13,2 +13,3 @@ const lambda_generated_1 = require("./lambda.generated"); | ||
this.canCreatePermissions = true; | ||
this.aliasName = props.aliasName; | ||
this.underlyingLambda = props.version.lambda; | ||
@@ -39,10 +40,16 @@ const alias = new lambda_generated_1.CfnAlias(this, 'Resource', { | ||
// Metrics on Aliases need the "bare" function name, and the alias' ARN, this differes from the base behavior. | ||
return super.metric(metricName, Object.assign({ dimensions: { | ||
return super.metric(metricName, { | ||
dimensions: { | ||
FunctionName: this.underlyingLambda.functionName, | ||
Resource: this.functionArn | ||
} }, props)); | ||
// construct the ARN from the underlying lambda so that alarms on an alias | ||
// don't cause a circular dependency with CodeDeploy | ||
// see: https://github.com/awslabs/aws-cdk/issues/2231 | ||
Resource: `${this.underlyingLambda.functionArn}:${this.aliasName}` | ||
}, | ||
...props | ||
}); | ||
} | ||
export() { | ||
return { | ||
functionArn: new cdk.CfnOutput(this, 'AliasArn', { value: this.functionArn }).makeImportValue().toString() | ||
functionArn: new cdk_1.CfnOutput(this, 'AliasArn', { value: this.functionArn }).makeImportValue().toString() | ||
}; | ||
@@ -85,2 +92,2 @@ } | ||
exports.Alias = Alias; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxpYXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhbGlhcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUNBLG9DQUFxQztBQUNyQyxtREFBK0U7QUFFL0UseURBQThDO0FBNkM5Qzs7R0FFRztBQUNILE1BQWEsS0FBTSxTQUFRLDRCQUFZO0lBd0JyQyxZQUFZLEtBQW9CLEVBQUUsRUFBVSxFQUFFLEtBQWlCO1FBQzdELEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFSQSx5QkFBb0IsR0FBWSxJQUFJLENBQUM7UUFVdEQsSUFBSSxDQUFDLGdCQUFnQixHQUFHLEtBQUssQ0FBQyxPQUFPLENBQUMsTUFBTSxDQUFDO1FBRTdDLE1BQU0sS0FBSyxHQUFHLElBQUksMkJBQVEsQ0FBQyxJQUFJLEVBQUUsVUFBVSxFQUFFO1lBQzNDLElBQUksRUFBRSxLQUFLLENBQUMsU0FBUztZQUNyQixXQUFXLEVBQUUsS0FBSyxDQUFDLFdBQVc7WUFDOUIsWUFBWSxFQUFFLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxZQUFZO1lBQ2hELGVBQWUsRUFBRSxLQUFLLENBQUMsT0FBTyxDQUFDLGVBQWU7WUFDOUMsYUFBYSxFQUFFLElBQUksQ0FBQyxzQkFBc0IsQ0FBQyxLQUFLLENBQUM7U0FDbEQsQ0FBQyxDQUFDO1FBRUgsb0dBQW9HO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WdodDtcbiAgICB9KS5yZWR1Y2UoKGEsIHgpID0+IGEgKyB4KTtcblxuICAgIGlmICh0b3RhbCA+IDEpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgU3VtIG9mIGFkZGl0aW9uYWwgdmVyc2lvbiB3ZWlnaHRzIG11c3Qgbm90IGV4Y2VlZCAxLCBnb3Q6ICR7dG90YWx9YCk7XG4gICAgfVxuICB9XG59XG5cbi8qKlxuICogQSB2ZXJzaW9uL3dlaWdodCBwYWlyIGZvciByb3V0aW5nIHRyYWZmaWMgdG8gTGFtYmRhIGZ1bmN0aW9uc1xuICovXG5leHBvcnQgaW50ZXJmYWNlIFZlcnNpb25XZWlnaHQge1xuICAvKipcbiAgICogVGhlIHZlcnNpb24gdG8gcm91dGUgdHJhZmZpYyB0b1xuICAgKi9cbiAgcmVhZG9ubHkgdmVyc2lvbjogVmVyc2lvbjtcblxuICAvKipcbiAgICogSG93IG11Y2ggd2VpZ2h0IHRvIGFzc2lnbiB0byB0aGlzIHZlcnNpb24gKDAuLjEpXG4gICAqL1xuICByZWFkb25seSB3ZWlnaHQ6IG51bWJlcjtcbn1cbiJdfQ== |
@@ -36,2 +36,9 @@ import assets = require('@aws-cdk/assets'); | ||
/** | ||
* Creates a new Lambda source defined using CloudFormation parameters. | ||
* | ||
* @returns a new instance of `CfnParametersCode` | ||
* @param props optional construction properties of {@link CfnParametersCode} | ||
*/ | ||
static cfnParameters(props?: CfnParametersCodeProps): CfnParametersCode; | ||
/** | ||
* Determines whether this Code is inline code or not. | ||
@@ -83,1 +90,52 @@ */ | ||
} | ||
/** | ||
* Construction properties for {@link CfnParametersCode}. | ||
*/ | ||
export interface CfnParametersCodeProps { | ||
/** | ||
* The CloudFormation parameter that represents the name of the S3 Bucket | ||
* where the Lambda code will be located in. | ||
* Must be of type 'String'. | ||
* | ||
* @default a new parameter will be created | ||
*/ | ||
readonly bucketNameParam?: cdk.CfnParameter; | ||
/** | ||
* The CloudFormation parameter that represents the path inside the S3 Bucket | ||
* where the Lambda code will be located at. | ||
* Must be of type 'String'. | ||
* | ||
* @default a new parameter will be created | ||
*/ | ||
readonly objectKeyParam?: cdk.CfnParameter; | ||
} | ||
/** | ||
* Lambda code defined using 2 CloudFormation parameters. | ||
* Useful when you don't have access to the code of your Lambda from your CDK code, so you can't use Assets, | ||
* and you want to deploy the Lambda in a CodePipeline, using CloudFormation Actions - | ||
* you can fill the parameters using the {@link #assign} method. | ||
*/ | ||
export declare class CfnParametersCode extends Code { | ||
readonly isInline = false; | ||
private _bucketNameParam?; | ||
private _objectKeyParam?; | ||
constructor(props?: CfnParametersCodeProps); | ||
bind(construct: cdk.Construct): void; | ||
/** | ||
* Create a parameters map from this instance's CloudFormation parameters. | ||
* | ||
* It returns a map with 2 keys that correspond to the names of the parameters defined in this Lambda code, | ||
* and as values it contains the appropriate expressions pointing at the provided S3 coordinates | ||
* (most likely, obtained from a CodePipeline Artifact by calling the `artifact.s3Coordinates` method). | ||
* The result should be provided to the CloudFormation Action | ||
* that is deploying the Stack that the Lambda with this code is part of, | ||
* in the `parameterOverrides` property. | ||
* | ||
* @param coordinates the coordinates of the object in S3 that represents the Lambda code | ||
*/ | ||
assign(coordinates: s3.Coordinates): { | ||
[name: string]: any; | ||
}; | ||
readonly bucketNameParam: string; | ||
readonly objectKeyParam: string; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const assets = require("@aws-cdk/assets"); | ||
const cdk = require("@aws-cdk/cdk"); | ||
const fs = require("fs"); | ||
@@ -47,2 +48,11 @@ class Code { | ||
/** | ||
* Creates a new Lambda source defined using CloudFormation parameters. | ||
* | ||
* @returns a new instance of `CfnParametersCode` | ||
* @param props optional construction properties of {@link CfnParametersCode} | ||
*/ | ||
static cfnParameters(props) { | ||
return new CfnParametersCode(props); | ||
} | ||
/** | ||
* Called when the lambda or layer is initialized to allow this object to | ||
@@ -158,2 +168,70 @@ * bind to the stack, add resources and have fun. | ||
exports.AssetCode = AssetCode; | ||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lc291cmNlTWV0YWRhdGEocmVzb3VyY2UsICdDb2RlJyk7XG4gICAgfVxuXG4gICAgcmV0dXJuICB7XG4gICAgICBzM0J1Y2tldDogdGhpcy5hc3NldCEuczNCdWNrZXROYW1lLFxuICAgICAgczNLZXk6IHRoaXMuYXNzZXQhLnMzT2JqZWN0S2V5XG4gICAgfTtcbiAgfVxufVxuIl19 | ||
/** | ||
* Lambda code defined using 2 CloudFormation parameters. | ||
* Useful when you don't have access to the code of your Lambda from your CDK code, so you can't use Assets, | ||
* and you want to deploy the Lambda in a CodePipeline, using CloudFormation Actions - | ||
* you can fill the parameters using the {@link #assign} method. | ||
*/ | ||
class CfnParametersCode extends Code { | ||
constructor(props = {}) { | ||
super(); | ||
this.isInline = false; | ||
this._bucketNameParam = props.bucketNameParam; | ||
this._objectKeyParam = props.objectKeyParam; | ||
} | ||
bind(construct) { | ||
if (!this._bucketNameParam) { | ||
this._bucketNameParam = new cdk.CfnParameter(construct, 'LambdaSourceBucketNameParameter', { | ||
type: 'String', | ||
}); | ||
} | ||
if (!this._objectKeyParam) { | ||
this._objectKeyParam = new cdk.CfnParameter(construct, 'LambdaSourceObjectKeyParameter', { | ||
type: 'String', | ||
}); | ||
} | ||
} | ||
/** | ||
* Create a parameters map from this instance's CloudFormation parameters. | ||
* | ||
* It returns a map with 2 keys that correspond to the names of the parameters defined in this Lambda code, | ||
* and as values it contains the appropriate expressions pointing at the provided S3 coordinates | ||
* (most likely, obtained from a CodePipeline Artifact by calling the `artifact.s3Coordinates` method). | ||
* The result should be provided to the CloudFormation Action | ||
* that is deploying the Stack that the Lambda with this code is part of, | ||
* in the `parameterOverrides` property. | ||
* | ||
* @param coordinates the coordinates of the object in S3 that represents the Lambda code | ||
*/ | ||
assign(coordinates) { | ||
const ret = {}; | ||
ret[this.bucketNameParam] = coordinates.bucketName; | ||
ret[this.objectKeyParam] = coordinates.objectKey; | ||
return ret; | ||
} | ||
/** @internal */ | ||
_toJSON(_) { | ||
return { | ||
s3Bucket: this._bucketNameParam.stringValue, | ||
s3Key: this._objectKeyParam.stringValue, | ||
}; | ||
} | ||
get bucketNameParam() { | ||
if (this._bucketNameParam) { | ||
return this._bucketNameParam.logicalId; | ||
} | ||
else { | ||
throw new Error('Pass CfnParametersCode to a Lambda Function before accessing the bucketNameParam property'); | ||
} | ||
} | ||
get objectKeyParam() { | ||
if (this._objectKeyParam) { | ||
return this._objectKeyParam.logicalId; | ||
} | ||
else { | ||
throw new Error('Pass CfnParametersCode to a Lambda Function before accessing the objectKeyParam property'); | ||
} | ||
} | ||
} | ||
exports.CfnParametersCode = CfnParametersCode; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29kZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNvZGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwwQ0FBMkM7QUFFM0Msb0NBQXFDO0FBQ3JDLHlCQUEwQjtBQUcxQixNQUFzQixJQUFJO0lBQ3hCOzs7OztPQUtHO0lBQ0ksTUFBTSxDQUFDLE1BQU0sQ0FBQyxNQUFrQixFQUFFLEdBQVcsRUFBRSxhQUFzQjtRQUMxRSxPQUFPLElBQUksTUFBTSxDQUFDLE1BQU0sRUFBRSxHQUFHLEVBQUUsYUFBYSxDQUFDLENBQUM7SUFDaEQsQ0FBQztJQUVEOzs7T0FHRztJQUNJLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBWTtRQUMvQixPQUFPLElBQUksVUFBVSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQzlCLENBQUM7SUFFRDs7O09BR0c7SUFDSSxNQUFNLENBQUMsS0FBSyxDQUFDLElBQVk7UUFDOUIsT0FBTyxJQUFJLFNBQVMsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUM3QixDQUFDO0lBRUQ7Ozs7O09BS0c7SUFDSSxNQUFNLENBQUMsU0FBUyxDQUFDLGNBQXNCO1FBQzVDLE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W5jdGlvbiBiZWZvcmUgYWNjZXNzaW5nIHRoZSBvYmplY3RLZXlQYXJhbSBwcm9wZXJ0eScpO1xuICAgIH1cbiAgfVxufVxuIl19 |
import cdk = require('@aws-cdk/cdk'); | ||
import { Resource } from '@aws-cdk/cdk'; | ||
import { IFunction } from './function-base'; | ||
@@ -50,3 +51,3 @@ export interface EventSourceMappingProps { | ||
*/ | ||
export declare class EventSourceMapping extends cdk.Construct { | ||
export declare class EventSourceMapping extends Resource { | ||
constructor(scope: cdk.Construct, id: string, props: EventSourceMappingProps); | ||
@@ -53,0 +54,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const cdk = require("@aws-cdk/cdk"); | ||
const cdk_1 = require("@aws-cdk/cdk"); | ||
const lambda_generated_1 = require("./lambda.generated"); | ||
@@ -17,3 +17,3 @@ /** | ||
*/ | ||
class EventSourceMapping extends cdk.Construct { | ||
class EventSourceMapping extends cdk_1.Resource { | ||
constructor(scope, id, props) { | ||
@@ -48,2 +48,2 @@ super(scope, id); | ||
})(StartingPosition = exports.StartingPosition || (exports.StartingPosition = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtc291cmNlLW1hcHBpbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJldmVudC1zb3VyY2UtbWFwcGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLG9DQUFxQztBQUVyQyx5REFBMkQ7QUEwQzNEOzs7Ozs7Ozs7OztHQVdHO0FBQ0gsTUFBYSxrQkFBbUIsU0FBUSxHQUFHLENBQUMsU0FBUztJQUNuRCxZQUFZLEtBQW9CLEVBQUUsRUFBVSxFQUFFLEtBQThCO1FBQzFFLEtBQUssQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFFakIsSUFBSSx3Q0FBcUIsQ0FBQyxJQUFJLEVBQUUsVUFBVSxFQU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1MgTGFtYmRhIHNob3VsZCBzdGFydFxuICogcmVhZGluZy5cbiAqL1xuZXhwb3J0IGVudW0gU3RhcnRpbmdQb3NpdGlvbiB7XG4gIC8qKlxuICAgKiBTdGFydCByZWFkaW5nIGF0IHRoZSBsYXN0IHVudHJpbW1lZCByZWNvcmQgaW4gdGhlIHNoYXJkIGluIHRoZSBzeXN0ZW0sXG4gICAqIHdoaWNoIGlzIHRoZSBvbGRlc3QgZGF0YSByZWNvcmQgaW4gdGhlIHNoYXJkLlxuICAgKi9cbiAgVHJpbUhvcml6b24gPSAnVFJJTV9IT1JJWk9OJyxcblxuICAvKipcbiAgICogU3RhcnQgcmVhZGluZyBqdXN0IGFmdGVyIHRoZSBtb3N0IHJlY2VudCByZWNvcmQgaW4gdGhlIHNoYXJkLCBzbyB0aGF0IHlvdVxuICAgKiBhbHdheXMgcmVhZCB0aGUgbW9zdCByZWNlbnQgZGF0YSBpbiB0aGUgc2hhcmRcbiAgICovXG4gIExhdGVzdCA9ICdMQVRFU1QnLFxufVxuIl19 |
import cloudwatch = require('@aws-cdk/aws-cloudwatch'); | ||
import ec2 = require('@aws-cdk/aws-ec2'); | ||
import events = require('@aws-cdk/aws-events'); | ||
import iam = require('@aws-cdk/aws-iam'); | ||
@@ -8,6 +7,6 @@ import logs = require('@aws-cdk/aws-logs'); | ||
import stepfunctions = require('@aws-cdk/aws-stepfunctions'); | ||
import cdk = require('@aws-cdk/cdk'); | ||
import { IResource, Resource } from '@aws-cdk/cdk'; | ||
import { IEventSource } from './event-source'; | ||
import { Permission } from './permission'; | ||
export interface IFunction extends cdk.IConstruct, events.IEventRuleTarget, logs.ILogSubscriptionDestination, s3n.IBucketNotificationDestination, ec2.IConnectable, stepfunctions.IStepFunctionsTaskResource, iam.IGrantable { | ||
export interface IFunction extends IResource, logs.ILogSubscriptionDestination, s3n.IBucketNotificationDestination, ec2.IConnectable, stepfunctions.IStepFunctionsTaskResource, iam.IGrantable { | ||
/** | ||
@@ -48,3 +47,3 @@ * Logical ID of this Function. | ||
*/ | ||
metric(metricName: string, props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -55,3 +54,3 @@ * Metric for the Duration of this Lambda | ||
*/ | ||
metricDuration(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricDuration(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -62,3 +61,3 @@ * Metric for the number of invocations of this Lambda | ||
*/ | ||
metricInvocations(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricInvocations(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -69,3 +68,3 @@ * Metric for the number of throttled invocations of this Lambda | ||
*/ | ||
metricThrottles(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricThrottles(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -101,3 +100,3 @@ * Export this Function (without the role) | ||
} | ||
export declare abstract class FunctionBase extends cdk.Construct implements IFunction { | ||
export declare abstract class FunctionBase extends Resource implements IFunction { | ||
/** | ||
@@ -151,7 +150,2 @@ * The principal this Lambda Function is running as | ||
/** | ||
* Returns a RuleTarget that can be used to trigger this Lambda as a | ||
* result from a CloudWatch event. | ||
*/ | ||
asEventRuleTarget(ruleArn: string, ruleId: string): events.EventRuleTargetProps; | ||
/** | ||
* Grant the given identity permissions to invoke this Lambda | ||
@@ -158,0 +152,0 @@ */ |
@@ -5,5 +5,5 @@ "use strict"; | ||
const s3n = require("@aws-cdk/aws-s3-notifications"); | ||
const cdk = require("@aws-cdk/cdk"); | ||
const cdk_1 = require("@aws-cdk/cdk"); | ||
const lambda_generated_1 = require("./lambda.generated"); | ||
class FunctionBase extends cdk.Construct { | ||
class FunctionBase extends cdk_1.Resource { | ||
constructor() { | ||
@@ -66,20 +66,2 @@ super(...arguments); | ||
/** | ||
* Returns a RuleTarget that can be used to trigger this Lambda as a | ||
* result from a CloudWatch event. | ||
*/ | ||
asEventRuleTarget(ruleArn, ruleId) { | ||
const permissionId = `AllowEventRule${ruleId}`; | ||
if (!this.node.tryFindChild(permissionId)) { | ||
this.addPermission(permissionId, { | ||
action: 'lambda:InvokeFunction', | ||
principal: new iam.ServicePrincipal('events.amazonaws.com'), | ||
sourceArn: ruleArn | ||
}); | ||
} | ||
return { | ||
id: this.node.id, | ||
arn: this.functionArn, | ||
}; | ||
} | ||
/** | ||
* Grant the given identity permissions to invoke this Lambda | ||
@@ -188,2 +170,2 @@ */ | ||
exports.FunctionBase = FunctionBase; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb24tYmFzZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImZ1bmN0aW9uLWJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFHQSx3Q0FBeUM7QUFFekMscURBQXNEO0FBRXRELG9DQUFxQztBQUVyQyx5REFBbUQ7QUEyR25ELE1BQXNCLFlBQWEsU0FBUSxHQUFHLENBQUMsU0FBUztJQUF4RDs7UUFzQ0U7O1dBRUc7UUFDSyw2Q0FBd0MsR0FBYSxFQUFFLENBQUM7SUFzTWxFLENBQUM7SUFwTUM7OztPQUdHO0lBQ0ksYUFBYSxDQUFDLEVBQVUsRUFBRSxVQUFzQjtRQUNyRCxJQUFJLENBQUMsSUFBSSxDQUFDLG9CQUFvQixFQUFFO1lBQzlCLHlCQUF5QjtZQUN6QixPQUFPO1NBQ1I7UUFFRCxNQUFNLFNBQVMsR0FBRyxJQUFJLENBQUMsd0JBQXdCLENBQUMsVUFBVSxDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBQ3RFLE1BQU0sTUFBTSxHQUFHLFVBQVUsQ0FBQyxNQUFNLElBQUksdUJBQXVCLENBQUM7UUFFNUQsSUFBSSxnQ0FBYSxDQUFDLElBQUksRUFBRS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wocHJpbmNpcGFsPzogaWFtLklQcmluY2lwYWwpIHtcbiAgICBpZiAoIXByaW5jaXBhbCkge1xuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG4gICAgLy8gdXNlIGR1Y2stdHlwaW5nLCBub3QgaW5zdGFuY2Ugb2ZcblxuICAgIGlmICgnYWNjb3VudElkJyBpbiBwcmluY2lwYWwpIHtcbiAgICAgIHJldHVybiAocHJpbmNpcGFsIGFzIGlhbS5BY2NvdW50UHJpbmNpcGFsKS5hY2NvdW50SWQ7XG4gICAgfVxuXG4gICAgaWYgKGBzZXJ2aWNlYCBpbiBwcmluY2lwYWwpIHtcbiAgICAgIHJldHVybiAocHJpbmNpcGFsIGFzIGlhbS5TZXJ2aWNlUHJpbmNpcGFsKS5zZXJ2aWNlO1xuICAgIH1cblxuICAgIHRocm93IG5ldyBFcnJvcihgSW52YWxpZCBwcmluY2lwYWwgdHlwZSBmb3IgTGFtYmRhIHBlcm1pc3Npb24gc3RhdGVtZW50OiAke3RoaXMubm9kZS5yZXNvbHZlKHByaW5jaXBhbC50b1N0cmluZygpKX0uIGAgK1xuICAgICAgJ1N1cHBvcnRlZDogQWNjb3VudFByaW5jaXBhbCwgU2VydmljZVByaW5jaXBhbCcpO1xuICB9XG59XG4iXX0= |
@@ -6,3 +6,3 @@ import cloudwatch = require('@aws-cdk/aws-cloudwatch'); | ||
import sqs = require('@aws-cdk/aws-sqs'); | ||
import cdk = require('@aws-cdk/cdk'); | ||
import { Construct } from '@aws-cdk/cdk'; | ||
import { Code } from './code'; | ||
@@ -210,3 +210,3 @@ import { IEventSource } from './event-source'; | ||
* | ||
* @param parent The parent construct | ||
* @param scope The parent construct | ||
* @param id The name of the lambda construct | ||
@@ -216,7 +216,7 @@ * @param props A reference to a Lambda function. Can be created manually (see | ||
*/ | ||
static import(scope: cdk.Construct, id: string, props: FunctionImportProps): IFunction; | ||
static import(scope: Construct, id: string, props: FunctionImportProps): IFunction; | ||
/** | ||
* Return the given named metric for this Lambda | ||
*/ | ||
static metricAll(metricName: string, props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
static metricAll(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -227,3 +227,3 @@ * Metric for the number of Errors executing all Lambdas | ||
*/ | ||
static metricAllErrors(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
static metricAllErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -234,3 +234,3 @@ * Metric for the Duration executing all Lambdas | ||
*/ | ||
static metricAllDuration(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
static metricAllDuration(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -241,3 +241,3 @@ * Metric for the number of invocations of all Lambdas | ||
*/ | ||
static metricAllInvocations(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
static metricAllInvocations(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -248,3 +248,3 @@ * Metric for the number of throttled invocations of all Lambdas | ||
*/ | ||
static metricAllThrottles(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
static metricAllThrottles(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -255,3 +255,3 @@ * Metric for the number of concurrent executions across all Lambdas | ||
*/ | ||
static metricAllConcurrentExecutions(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
static metricAllConcurrentExecutions(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -262,3 +262,3 @@ * Metric for the number of unreserved concurrent executions across all Lambdas | ||
*/ | ||
static metricAllUnreservedConcurrentExecutions(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
static metricAllUnreservedConcurrentExecutions(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -294,3 +294,3 @@ * Name of this function | ||
private readonly environment?; | ||
constructor(scope: cdk.Construct, id: string, props: FunctionProps); | ||
constructor(scope: Construct, id: string, props: FunctionProps); | ||
/** | ||
@@ -358,11 +358,1 @@ * Export this Function (without the role) | ||
} | ||
export declare class ImportedFunction extends FunctionBase { | ||
private readonly props; | ||
readonly grantPrincipal: iam.IPrincipal; | ||
readonly functionName: string; | ||
readonly functionArn: string; | ||
readonly role?: iam.IRole; | ||
protected readonly canCreatePermissions = false; | ||
constructor(scope: cdk.Construct, id: string, props: FunctionImportProps); | ||
export(): FunctionImportProps; | ||
} |
@@ -7,3 +7,3 @@ "use strict"; | ||
const sqs = require("@aws-cdk/aws-sqs"); | ||
const cdk = require("@aws-cdk/cdk"); | ||
const cdk_1 = require("@aws-cdk/cdk"); | ||
const function_base_1 = require("./function-base"); | ||
@@ -73,4 +73,4 @@ const lambda_version_1 = require("./lambda-version"); | ||
description: props.description, | ||
code: new cdk.Token(() => props.code._toJSON(resource)), | ||
layers: new cdk.Token(() => this.layers.length > 0 ? this.layers.map(layer => layer.layerVersionArn) : undefined).toList(), | ||
code: new cdk_1.Token(() => props.code._toJSON(resource)), | ||
layers: new cdk_1.Token(() => this.layers.length > 0 ? this.layers.map(layer => layer.layerVersionArn) : undefined).toList(), | ||
handler: props.handler, | ||
@@ -80,3 +80,3 @@ timeout: props.timeout, | ||
role: this.role.roleArn, | ||
environment: new cdk.Token(() => this.renderEnvironment()), | ||
environment: new cdk_1.Token(() => this.renderEnvironment()), | ||
memorySize: props.memorySize, | ||
@@ -115,3 +115,3 @@ vpcConfig: this.configureVpc(props), | ||
* | ||
* @param parent The parent construct | ||
* @param scope The parent construct | ||
* @param id The name of the lambda construct | ||
@@ -128,3 +128,7 @@ * @param props A reference to a Lambda function. Can be created manually (see | ||
static metricAll(metricName, props) { | ||
return new cloudwatch.Metric(Object.assign({ namespace: 'AWS/Lambda', metricName }, props)); | ||
return new cloudwatch.Metric({ | ||
namespace: 'AWS/Lambda', | ||
metricName, | ||
...props | ||
}); | ||
} | ||
@@ -137,3 +141,3 @@ /** | ||
static metricAllErrors(props) { | ||
return this.metricAll('Errors', Object.assign({ statistic: 'sum' }, props)); | ||
return this.metricAll('Errors', { statistic: 'sum', ...props }); | ||
} | ||
@@ -154,3 +158,3 @@ /** | ||
static metricAllInvocations(props) { | ||
return this.metricAll('Invocations', Object.assign({ statistic: 'sum' }, props)); | ||
return this.metricAll('Invocations', { statistic: 'sum', ...props }); | ||
} | ||
@@ -163,3 +167,3 @@ /** | ||
static metricAllThrottles(props) { | ||
return this.metricAll('Throttles', Object.assign({ statistic: 'sum' }, props)); | ||
return this.metricAll('Throttles', { statistic: 'sum', ...props }); | ||
} | ||
@@ -178,3 +182,3 @@ /** | ||
// otherwise not be visible in the avg) | ||
return this.metricAll('ConcurrentExecutions', Object.assign({ statistic: 'max' }, props)); | ||
return this.metricAll('ConcurrentExecutions', { statistic: 'max', ...props }); | ||
} | ||
@@ -187,3 +191,3 @@ /** | ||
static metricAllUnreservedConcurrentExecutions(props) { | ||
return this.metricAll('UnreservedConcurrentExecutions', Object.assign({ statistic: 'max' }, props)); | ||
return this.metricAll('UnreservedConcurrentExecutions', { statistic: 'max', ...props }); | ||
} | ||
@@ -195,5 +199,5 @@ /** | ||
return { | ||
functionArn: new cdk.CfnOutput(this, 'FunctionArn', { value: this.functionArn }).makeImportValue().toString(), | ||
functionArn: new cdk_1.CfnOutput(this, 'FunctionArn', { value: this.functionArn }).makeImportValue().toString(), | ||
securityGroupId: this._connections && this._connections.securityGroups[0] | ||
? new cdk.CfnOutput(this, 'SecurityGroupId', { value: this._connections.securityGroups[0].securityGroupId }).makeImportValue().toString() | ||
? new cdk_1.CfnOutput(this, 'SecurityGroupId', { value: this._connections.securityGroups[0].securityGroupId }).makeImportValue().toString() | ||
: undefined | ||
@@ -309,3 +313,3 @@ }; | ||
// Isolated networks or selecting among 2 sets of Private subnets by name. | ||
const subnetIds = props.vpc.subnetIds(props.vpcSubnets); | ||
const { subnetIds } = props.vpc.selectSubnets(props.vpcSubnets); | ||
const publicSubnetIds = new Set(props.vpc.publicSubnets.map(s => s.subnetId)); | ||
@@ -376,3 +380,2 @@ for (const subnetId of subnetIds) { | ||
} | ||
exports.ImportedFunction = ImportedFunction; | ||
/** | ||
@@ -392,4 +395,4 @@ * Given an opaque (token) ARN, returns a CloudFormation expression that extracts the function | ||
function extractNameFromArn(arn) { | ||
return cdk.Fn.select(6, cdk.Fn.split(':', arn)); | ||
return cdk_1.Fn.select(6, cdk_1.Fn.split(':', arn)); | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnVuY3Rpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJmdW5jdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHNEQUF1RDtBQUN2RCx3Q0FBeUM7QUFDekMsd0NBQXlDO0FBRXpDLHdDQUF5QztBQUN6QyxvQ0FBcUM7QUFHckMsbURBQStFO0FBQy9FLHFEQUEyQztBQUMzQyx5REFBaUQ7QUFFakQsbURBQStDO0FBRy9DOztHQUVHO0FBQ0gsSUFBWSxPQWVYO0FBZkQsV0FBWSxPQUFPO0lBQ2pCOzs7T0FHRztJQUNILHlDQUFNLENBQUE7SUFDTjs7O09BR0c7SUFDSCxtREFBVyxDQUFBO0lBQ1g7O09BRUc7SUFDSCw2Q0FBUSxDQUFBO0FBQ1YsQ0FBQyxFQWZXLE9BQU8sR0FBUCxlQUFPLEtBQVAsZUFBTyxRQWVsQjtBQW9MRDs7Ozs7Ozs7OztHQVVHO0FBQ0gsTUFBYSxRQUFTLFNBQVEsNEJBQVk7SUE2SHhDLFlBQVksS0FBb0IsRUFBRSxFQUFVLEVBQUUsS0FBb0I7UUFDaEUsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FBQztRQVZBLHlCQUFvQixHQUFHLElBQUksQ0FBQztRQUU5QixXQUFNLEdBQW9CLEVBQUUsQ0FBQztRQVU1QyxJQUFJLENBQUMsV0FB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RoZSBjb21wb25lbnQgaW4gaW5kZXggNi5cbiAqXG4gKiBAcmV0dXJucyBgRm5TZWxlY3QoNiwgRm5TcGxpdCgnOicsIGFybikpYFxuICovXG5mdW5jdGlvbiBleHRyYWN0TmFtZUZyb21Bcm4oYXJuOiBzdHJpbmcpIHtcbiAgcmV0dXJuIEZuLnNlbGVjdCg2LCBGbi5zcGxpdCgnOicsIGFybikpO1xufVxuIl19 |
@@ -7,3 +7,3 @@ import cloudwatch = require("@aws-cdk/aws-cloudwatch"); | ||
*/ | ||
metric(metricName: string, props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -14,3 +14,3 @@ * How often this Lambda is throttled | ||
*/ | ||
metricThrottles(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricThrottles(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -21,3 +21,3 @@ * How often this Lambda is invoked | ||
*/ | ||
metricInvocations(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricInvocations(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -28,3 +28,3 @@ * How many invocations of this Lambda fail | ||
*/ | ||
metricErrors(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -35,3 +35,3 @@ * How long execution of this Lambda takes | ||
*/ | ||
metricDuration(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricDuration(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
} | ||
@@ -42,3 +42,3 @@ interface FunctionBase { | ||
*/ | ||
metric(metricName: string, props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -49,3 +49,3 @@ * How often this Lambda is throttled | ||
*/ | ||
metricThrottles(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricThrottles(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -56,3 +56,3 @@ * How often this Lambda is invoked | ||
*/ | ||
metricInvocations(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricInvocations(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -63,3 +63,3 @@ * How many invocations of this Lambda fail | ||
*/ | ||
metricErrors(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
/** | ||
@@ -70,4 +70,4 @@ * How long execution of this Lambda takes | ||
*/ | ||
metricDuration(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricDuration(props?: cloudwatch.MetricOptions): cloudwatch.Metric; | ||
} | ||
} |
@@ -8,16 +8,21 @@ "use strict"; | ||
function_base_1.FunctionBase.prototype.metric = function (metricName, props) { | ||
return new cloudwatch.Metric(Object.assign({ namespace: 'AWS/Lambda', metricName, dimensions: { FunctionName: this.functionName } }, props)); | ||
return new cloudwatch.Metric({ | ||
namespace: 'AWS/Lambda', | ||
metricName, | ||
dimensions: { FunctionName: this.functionName }, | ||
...props | ||
}); | ||
}; | ||
function_base_1.FunctionBase.prototype.metricThrottles = function (props) { | ||
return this.metric('Throttles', Object.assign({ statistic: 'Sum' }, props)); | ||
return this.metric('Throttles', { statistic: 'Sum', ...props }); | ||
}; | ||
function_base_1.FunctionBase.prototype.metricInvocations = function (props) { | ||
return this.metric('Invocations', Object.assign({ statistic: 'Sum' }, props)); | ||
return this.metric('Invocations', { statistic: 'Sum', ...props }); | ||
}; | ||
function_base_1.FunctionBase.prototype.metricErrors = function (props) { | ||
return this.metric('Errors', Object.assign({ statistic: 'Sum' }, props)); | ||
return this.metric('Errors', { statistic: 'Sum', ...props }); | ||
}; | ||
function_base_1.FunctionBase.prototype.metricDuration = function (props) { | ||
return this.metric('Duration', Object.assign({ statistic: 'Average' }, props)); | ||
return this.metric('Duration', { statistic: 'Average', ...props }); | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFtYmRhLWF1Z21lbnRhdGlvbnMuZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsibGFtYmRhLWF1Z21lbnRhdGlvbnMuZ2VuZXJhdGVkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwrRUFBK0U7O0FBRS9FLGtHQUFrRztBQUNsRyxzREFBdUQ7QUFDdkQsbURBQStDO0FBK0QvQyw0QkFBWSxDQUFDLFNBQVMsQ0FBQyxNQUFNLEdBQUcsVUFBUyxVQUFrQixFQUFFLEtBQXNDO0lBQ2pHLE9BQU8sSUFBSSxVQUFVLENBQUMsTUFBTSxpQkFDMUIsU0FBUyxFQUFFLFlBQVksRUFDdkIsVUFBVSxFQUNWLFVBQVUsRUFBRSxFQUFFLFlBQVksRUFBRSxJQUFJLENBQUMsWUFBWSxFQUFFLElBQzVDLEtBQUssRUFDUixDQUFDO0FBQ0wsQ0FBQyxDQUFDO0FBQ0YsNEJBQVksQ0FBQyxTQUFTLENBQUMsZUFBZSxHQUFHLFVBQVMsS0FBc0M7SUFDdEYsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLFdBQVcsa0JBQUksU0FBUyxFQUFFLEtBQUssSUFBSyxLQUFLLEVBQUcsQ0FBQztBQUNsRSxDQUFDLENBQUM7QUFDRiw0QkFBWSxDQUFDLFNBQVMsQ0FBQyxpQkFBaUIsR0FBRyxVQUFTLEtBQXNDO0lBQ3hGLE9BQU8sSUFBSSxDQUFDLE1BQU0sQ0FBQyxhQUFhLGtCQUFJLFNBQVMsRUFBRSxLQUFLLElBQUssS0FBSyxFQUFHLENBQUM7QUFDcEUsQ0FBQyxDQUFDO0FBQ0YsNEJBQVksQ0FBQyxTQUFTLENBQUMs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gICBpbnRlcmZhY2UgRnVuY3Rpb25CYXNlIHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIFJldHVybiB0aGUgZ2l2ZW4gbmFtZWQgbWV0cmljIGZvciB0aGlzIEZ1bmN0aW9uXG4gICAgICAgICAqL1xuICAgICAgICBtZXRyaWMobWV0cmljTmFtZTogc3RyaW5nLCBwcm9wcz86IGNsb3Vkd2F0Y2guTWV0cmljQ3VzdG9taXphdGlvbik6IGNsb3Vkd2F0Y2guTWV0cmljO1xuICAgICAgICAvKipcbiAgICAgICAgICogSG93IG9mdGVuIHRoaXMgTGFtYmRhIGlzIHRocm90dGxlZFxuICAgICAgICAgKlxuICAgICAgICAgKiBTdW0gb3ZlciA1IG1pbnV0ZXNcbiAgICAgICAgICovXG4gICAgICAgIG1ldHJpY1Rocm90dGxlcyhwcm9wcz86IGNsb3Vkd2F0Y2guTWV0cmljQ3VzdG9taXphdGlvbik6IGNsb3Vkd2F0Y2guTWV0cmljO1xuICAgICAgICAvKipcbiAgICAgICAgICogSG93IG9mdGVuIHRoaXMgTGFtYmRhIGlzIGludm9rZWRcbiAgICAgICAgICpcbiAgICAgICAgICogU3VtIG92ZXIgNSBtaW51dGVzXG4gICAgICAgICAqL1xuICAgICAgICBtZXRyaWNJbnZvY2F0aW9ucyhwcm9wcz86IGNsb3Vkd2F0Y2guTWV0cmljQ3VzdG9taXphdGlvbik6IGNsb3Vkd2F0Y2guTWV0cmljO1xuICAgICAgICAvKipcbiAgICAgICAgICogSG93IG1hbnkgaW52b2NhdGlvbnMgb2YgdGhpcyBMYW1iZGEgZmFpbFxuICAgICAgICAgKlxuICAgICAgICAgKiBTdW0gb3ZlciA1IG1pbnV0ZXNcbiAgICAgICAgICovXG4gICAgICAgIG1ldHJpY0Vycm9ycyhwcm9wcz86IGNsb3Vkd2F0Y2guTWV0cmljQ3VzdG9taXphdGlvbik6IGNsb3Vkd2F0Y2guTWV0cmljO1xuICAgICAgICAvKipcbiAgICAgICAgICogSG93IGxvb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AgcmV0dXJuIHRoaXMubWV0cmljKCdUaHJvdHRsZXMnLCB7IHN0YXRpc3RpYzogJ1N1bScsIC4uLnByb3BzIH0pO1xufTtcbkZ1bmN0aW9uQmFzZS5wcm90b3R5cGUubWV0cmljSW52b2NhdGlvbnMgPSBmdW5jdGlvbihwcm9wcz86IGNsb3Vkd2F0Y2guTWV0cmljT3B0aW9ucykge1xuICByZXR1cm4gdGhpcy5tZXRyaWMoJ0ludm9jYXRpb25zJywgeyBzdGF0aXN0aWM6ICdTdW0nLCAuLi5wcm9wcyB9KTtcbn07XG5GdW5jdGlvbkJhc2UucHJvdG90eXBlLm1ldHJpY0Vycm9ycyA9IGZ1bmN0aW9uKHByb3BzPzogY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zKSB7XG4gIHJldHVybiB0aGlzLm1ldHJpYygnRXJyb3JzJywgeyBzdGF0aXN0aWM6ICdTdW0nLCAuLi5wcm9wcyB9KTtcbn07XG5GdW5jdGlvbkJhc2UucHJvdG90eXBlLm1ldHJpY0R1cmF0aW9uID0gZnVuY3Rpb24ocHJvcHM/OiBjbG91ZHdhdGNoLk1ldHJpY09wdGlvbnMpIHtcbiAgcmV0dXJuIHRoaXMubWV0cmljKCdEdXJhdGlvbicsIHsgc3RhdGlzdGljOiAnQXZlcmFnZScsIC4uLnByb3BzIH0pO1xufTtcbiJdfQ== |
@@ -1,2 +0,2 @@ | ||
import { Construct } from '@aws-cdk/cdk'; | ||
import { Construct, Resource } from '@aws-cdk/cdk'; | ||
import { IFunction } from './function-base'; | ||
@@ -42,3 +42,3 @@ /** | ||
*/ | ||
export declare class Version extends Construct { | ||
export declare class Version extends Resource { | ||
/** | ||
@@ -45,0 +45,0 @@ * The most recently deployed version of this function. |
@@ -21,3 +21,3 @@ "use strict"; | ||
*/ | ||
class Version extends cdk_1.Construct { | ||
class Version extends cdk_1.Resource { | ||
constructor(scope, id, props) { | ||
@@ -35,2 +35,2 @@ super(scope, id); | ||
exports.Version = Version; | ||
//# sour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IGlzIGFzc29jaWF0ZWQgd2l0aFxuICAgKi9cbiAgcHVibGljIHJlYWRvbmx5IGxhbWJkYTogSUZ1bmN0aW9uO1xuXG4gIGNvbnN0cnVjdG9yKHNjb3BlOiBDb25zdHJ1Y3QsIGlkOiBzdHJpbmcsIHByb3BzOiBWZXJzaW9uUHJvcHMpIHtcbiAgICBzdXBlcihzY29wZSwgaWQpO1xuXG4gICAgY29uc3QgdmVyc2lvbiA9IG5ldyBDZm5WZXJzaW9uKHRoaXMsICdSZXNvdXJjZScsIHtcbiAgICAgIGNvZGVTaGEyNTY6IHByb3BzLmNvZGVTaGEyNTYsXG4gICAgICBkZXNjcmlwdGlvbjogcHJvcHMuZGVzY3JpcHRpb24sXG4gICAgICBmdW5jdGlvbk5hbWU6IHByb3BzLmxhbWJkYS5mdW5jdGlvbk5hbWVcbiAgICB9KTtcblxuICAgIHRoaXMuZnVuY3Rpb25WZXJzaW9uID0gdmVyc2lvbi52ZXJzaW9uO1xuICAgIHRoaXMubGFtYmRhID0gcHJvcHMubGFtYmRhO1xuICB9XG59XG4iXX0= |
@@ -1,2 +0,2 @@ | ||
import cdk = require('@aws-cdk/cdk'); | ||
import { Construct, IResource, Resource } from '@aws-cdk/cdk'; | ||
import { Code } from './code'; | ||
@@ -31,3 +31,3 @@ import { Runtime } from './runtime'; | ||
} | ||
export interface ILayerVersion extends cdk.IConstruct { | ||
export interface ILayerVersion extends IResource { | ||
/** | ||
@@ -60,3 +60,3 @@ * The ARN of the Lambda Layer version that this Layer defines. | ||
*/ | ||
export declare abstract class LayerVersionBase extends cdk.Construct implements ILayerVersion { | ||
export declare abstract class LayerVersionBase extends Resource implements ILayerVersion { | ||
abstract readonly layerVersionArn: string; | ||
@@ -107,6 +107,6 @@ abstract readonly compatibleRuntimes?: Runtime[]; | ||
*/ | ||
static import(scope: cdk.Construct, id: string, props: LayerVersionImportProps): ILayerVersion; | ||
static import(scope: Construct, id: string, props: LayerVersionImportProps): ILayerVersion; | ||
readonly layerVersionArn: string; | ||
readonly compatibleRuntimes?: Runtime[]; | ||
constructor(scope: cdk.Construct, id: string, props: LayerVersionProps); | ||
constructor(scope: Construct, id: string, props: LayerVersionProps); | ||
} | ||
@@ -130,5 +130,5 @@ /** | ||
*/ | ||
export declare class SingletonLayerVersion extends cdk.Construct implements ILayerVersion { | ||
export declare class SingletonLayerVersion extends Construct implements ILayerVersion { | ||
private readonly layerVersion; | ||
constructor(scope: cdk.Construct, id: string, props: SingletonLayerVersionProps); | ||
constructor(scope: Construct, id: string, props: SingletonLayerVersionProps); | ||
readonly layerVersionArn: string; | ||
@@ -135,0 +135,0 @@ readonly compatibleRuntimes: Runtime[] | undefined; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const cdk = require("@aws-cdk/cdk"); | ||
const cdk_1 = require("@aws-cdk/cdk"); | ||
const lambda_generated_1 = require("./lambda.generated"); | ||
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
class LayerVersionBase extends cdk.Construct { | ||
class LayerVersionBase extends cdk_1.Resource { | ||
grantUsage(id, grantee) { | ||
@@ -24,3 +24,3 @@ if (grantee.organizationId != null && grantee.accountId !== '*') { | ||
return { | ||
layerVersionArn: new cdk.CfnOutput(this, 'LayerVersionArn', { value: this.layerVersionArn }).makeImportValue().toString(), | ||
layerVersionArn: new cdk_1.CfnOutput(this, 'LayerVersionArn', { value: this.layerVersionArn }).makeImportValue().toString(), | ||
compatibleRuntimes: this.compatibleRuntimes, | ||
@@ -57,3 +57,3 @@ }; | ||
compatibleRuntimes: props.compatibleRuntimes && props.compatibleRuntimes.map(r => r.name), | ||
content: new cdk.Token(() => props.code._toJSON(resource)), | ||
content: new cdk_1.Token(() => props.code._toJSON(resource)), | ||
description: props.description, | ||
@@ -83,3 +83,3 @@ layerName: props.name, | ||
*/ | ||
class SingletonLayerVersion extends cdk.Construct { | ||
class SingletonLayerVersion extends cdk_1.Construct { | ||
constructor(scope, id, props) { | ||
@@ -115,2 +115,2 @@ super(scope,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uIHtcbiAgICAgIGxheWVyVmVyc2lvbkFybjogdGhpcy5sYXllclZlcnNpb25Bcm4sXG4gICAgICBjb21wYXRpYmxlUnVudGltZXM6IHRoaXMuY29tcGF0aWJsZVJ1bnRpbWVzLFxuICAgIH07XG4gIH1cblxuICBwdWJsaWMgZ3JhbnRVc2FnZShpZDogc3RyaW5nLCBncmFudGVlOiBMYXllclZlcnNpb25Vc2FnZUdyYW50ZWUpOiBJTGF5ZXJWZXJzaW9uIHtcbiAgICB0aGlzLmxheWVyVmVyc2lvbi5ncmFudFVzYWdlKGlkLCBncmFudGVlKTtcbiAgICByZXR1cm4gdGhpcztcbiAgfVxuXG4gIHByaXZhdGUgZW5zdXJlTGF5ZXJWZXJzaW9uKHByb3BzOiBTaW5nbGV0b25MYXllclZlcnNpb25Qcm9wcyk6IElMYXllclZlcnNpb24ge1xuICAgIGNvbnN0IHNpbmdsZXRvbklkID0gYFNpbmdsZXRvbkxheWVyLSR7cHJvcHMudXVpZH1gO1xuICAgIGNvbnN0IGV4aXN0aW5nID0gdGhpcy5ub2RlLnN0YWNrLm5vZGUudHJ5RmluZENoaWxkKHNpbmdsZXRvbklkKTtcbiAgICBpZiAoZXhpc3RpbmcpIHtcbiAgICAgIHJldHVybiBleGlzdGluZyBhcyB1bmtub3duIGFzIElMYXllclZlcnNpb247XG4gICAgfVxuICAgIHJldHVybiBuZXcgTGF5ZXJWZXJzaW9uKHRoaXMubm9kZS5zdGFjaywgc2luZ2xldG9uSWQsIHByb3BzKTtcbiAgfVxufVxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF5ZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsibGF5ZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsc0NBQWdGO0FBRWhGLHlEQUFnRjtBQWdFaEY7O0dBRUc7QUFDSCxNQUFzQixnQkFBaUIsU0FBUSxjQU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vbiB7XG4gICAgdGhpcy5sYXllclZlcnNpb24uZ3JhbnRVc2FnZShpZCwgZ3JhbnRlZSk7XG4gICAgcmV0dXJuIHRoaXM7XG4gIH1cblxuICBwcml2YXRlIGVuc3VyZUxheWVyVmVyc2lvbihwcm9wczogU2luZ2xldG9uTGF5ZXJWZXJzaW9uUHJvcHMpOiBJTGF5ZXJWZXJzaW9uIHtcbiAgICBjb25zdCBzaW5nbGV0b25JZCA9IGBTaW5nbGV0b25MYXllci0ke3Byb3BzLnV1aWR9YDtcbiAgICBjb25zdCBleGlzdGluZyA9IHRoaXMubm9kZS5zdGFjay5ub2RlLnRyeUZpbmRDaGlsZChzaW5nbGV0b25JZCk7XG4gICAgaWYgKGV4aXN0aW5nKSB7XG4gICAgICByZXR1cm4gZXhpc3RpbmcgYXMgdW5rbm93biBhcyBJTGF5ZXJWZXJzaW9uO1xuICAgIH1cbiAgICByZXR1cm4gbmV3IExheWVyVmVyc2lvbih0aGlzLm5vZGUuc3RhY2ssIHNpbmdsZXRvbklkLCBwcm9wcyk7XG4gIH1cbn1cbiJdfQ== |
@@ -50,5 +50,13 @@ "use strict"; | ||
// there could be a race condition. So we also try to create the log group | ||
// of this function first. | ||
await createLogGroupSafe(`/aws/lambda/${context.functionName}`); | ||
await setRetentionPolicy(`/aws/lambda/${context.functionName}`, 1); | ||
// of this function first. If multiple LogRetention constructs are present | ||
// in the stack, they will try to act on this function's log group at the | ||
// same time. This can sometime result in an OperationAbortedException. To | ||
// avoid this and because this operation is not critical we catch all errors. | ||
try { | ||
await createLogGroupSafe(`/aws/lambda/${context.functionName}`); | ||
await setRetentionPolicy(`/aws/lambda/${context.functionName}`, 1); | ||
} | ||
catch (e) { | ||
console.log(e); | ||
} | ||
} | ||
@@ -94,2 +102,2 @@ } | ||
exports.handler = handler; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6Wy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
@@ -25,10 +25,9 @@ "use strict"; | ||
}); | ||
if (provider.role && !provider.role.node.tryFindChild('DefaultPolicy')) { // Avoid duplicate statements | ||
provider.role.addToPolicy(new iam.PolicyStatement() | ||
.addActions('logs:PutRetentionPolicy', 'logs:DeleteRetentionPolicy') | ||
// We need '*' here because we will also put a retention policy on | ||
// the log group of the provider function. Referencing it's name | ||
// creates a CF circular dependency. | ||
.addAllResources()); | ||
} | ||
provider.addToRolePolicy(// Duplicate statements will be deduplicated by `PolicyDocument` | ||
new iam.PolicyStatement() | ||
.addActions('logs:PutRetentionPolicy', 'logs:DeleteRetentionPolicy') | ||
// We need '*' here because we will also put a retention policy on | ||
// the log group of the provider function. Referencing it's name | ||
// creates a CF circular dependency. | ||
.addAllResources()); | ||
// Need to use a CfnResource here to prevent lerna dependency cycles | ||
@@ -47,2 +46,2 @@ // @aws-cdk/aws-cloudformation -> @aws-cdk/aws-lambda -> @aws-cdk/aws-cloudformation | ||
exports.LogRetention = LogRetention; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nLXJldGVudGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImxvZy1yZXRlbnRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx3Q0FBeUM7QUFFekMsb0NBQXFDO0FBQ3JDLDZCQUE4QjtBQUM5QixpQ0FBOEI7QUFDOUIsdUNBQW9DO0FBQ3BDLHlEQUF1RDtBQWlCdkQ7Ozs7R0FJRztBQUNILE1BQWEsWUFBYSxTQUFRLEdBQUcsQ0FBQyxTQUFTO0lBQzdDLFlBQVksS0FBb0IsRUFBRSxFQUFVLEVBQUUsS0FBd0I7UUFDcEUsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FBQztRQUVqQiwyQkFBMkI7UUFDM0IsTUFBTSxRQUFRLEdBQUcsSUFBSSxvQ0FBaUIsQ0FBQyxJQUF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9wcy5yZXRlbnRpb25EYXlzID09PSBJbmZpbml0eSA/IHVuZGVmaW5lZCA6IHByb3BzLnJldGVudGlvbkRheXNcbiAgICAgIH1cbiAgICB9KTtcbiAgfVxufVxuIl19 |
{ | ||
"name": "@aws-cdk/aws-lambda", | ||
"version": "0.28.0", | ||
"version": "0.29.0", | ||
"description": "CDK Constructs for AWS Lambda", | ||
@@ -32,3 +32,4 @@ "main": "lib/index.js", | ||
"type": "git", | ||
"url": "https://github.com/awslabs/aws-cdk.git" | ||
"url": "https://github.com/awslabs/aws-cdk.git", | ||
"directory": "packages/@aws-cdk/aws-lambda" | ||
}, | ||
@@ -66,42 +67,43 @@ "scripts": { | ||
"devDependencies": { | ||
"@aws-cdk/assert": "^0.28.0", | ||
"@types/aws-lambda": "^8.10.23", | ||
"@aws-cdk/assert": "^0.29.0", | ||
"@types/aws-lambda": "^8.10.24", | ||
"@types/nock": "^9.3.1", | ||
"@types/sinon": "^7.0.10", | ||
"aws-sdk": "^2.425.0", | ||
"aws-sdk-mock": "^4.3.1", | ||
"cdk-build-tools": "^0.28.0", | ||
"cdk-integ-tools": "^0.28.0", | ||
"cfn2ts": "^0.28.0", | ||
"@types/sinon": "^7.0.11", | ||
"aws-sdk": "^2.438.0", | ||
"aws-sdk-mock": "^4.4.0", | ||
"cdk-build-tools": "^0.29.0", | ||
"cdk-integ-tools": "^0.29.0", | ||
"cfn2ts": "^0.29.0", | ||
"nock": "^10.0.6", | ||
"pkglint": "^0.28.0", | ||
"sinon": "^7.3.0" | ||
"pkglint": "^0.29.0", | ||
"sinon": "^7.3.1" | ||
}, | ||
"dependencies": { | ||
"@aws-cdk/assets": "^0.28.0", | ||
"@aws-cdk/aws-cloudwatch": "^0.28.0", | ||
"@aws-cdk/aws-ec2": "^0.28.0", | ||
"@aws-cdk/aws-events": "^0.28.0", | ||
"@aws-cdk/aws-iam": "^0.28.0", | ||
"@aws-cdk/aws-logs": "^0.28.0", | ||
"@aws-cdk/aws-s3": "^0.28.0", | ||
"@aws-cdk/aws-s3-notifications": "^0.28.0", | ||
"@aws-cdk/aws-sqs": "^0.28.0", | ||
"@aws-cdk/aws-stepfunctions": "^0.28.0", | ||
"@aws-cdk/cdk": "^0.28.0", | ||
"@aws-cdk/cx-api": "^0.28.0" | ||
"@aws-cdk/assets": "^0.29.0", | ||
"@aws-cdk/aws-cloudwatch": "^0.29.0", | ||
"@aws-cdk/aws-ec2": "^0.29.0", | ||
"@aws-cdk/aws-events": "^0.29.0", | ||
"@aws-cdk/aws-iam": "^0.29.0", | ||
"@aws-cdk/aws-logs": "^0.29.0", | ||
"@aws-cdk/aws-s3": "^0.29.0", | ||
"@aws-cdk/aws-s3-notifications": "^0.29.0", | ||
"@aws-cdk/aws-sqs": "^0.29.0", | ||
"@aws-cdk/aws-stepfunctions": "^0.29.0", | ||
"@aws-cdk/cdk": "^0.29.0", | ||
"@aws-cdk/cx-api": "^0.29.0" | ||
}, | ||
"homepage": "https://github.com/awslabs/aws-cdk", | ||
"peerDependencies": { | ||
"@aws-cdk/assets": "^0.28.0", | ||
"@aws-cdk/aws-cloudwatch": "^0.28.0", | ||
"@aws-cdk/aws-ec2": "^0.28.0", | ||
"@aws-cdk/aws-events": "^0.28.0", | ||
"@aws-cdk/aws-iam": "^0.28.0", | ||
"@aws-cdk/aws-logs": "^0.28.0", | ||
"@aws-cdk/aws-s3": "^0.28.0", | ||
"@aws-cdk/aws-s3-notifications": "^0.28.0", | ||
"@aws-cdk/aws-sqs": "^0.28.0", | ||
"@aws-cdk/aws-stepfunctions": "^0.28.0", | ||
"@aws-cdk/cdk": "^0.28.0" | ||
"@aws-cdk/assets": "^0.29.0", | ||
"@aws-cdk/aws-cloudwatch": "^0.29.0", | ||
"@aws-cdk/aws-ec2": "^0.29.0", | ||
"@aws-cdk/aws-events": "^0.29.0", | ||
"@aws-cdk/aws-iam": "^0.29.0", | ||
"@aws-cdk/aws-logs": "^0.29.0", | ||
"@aws-cdk/aws-s3": "^0.29.0", | ||
"@aws-cdk/aws-s3-notifications": "^0.29.0", | ||
"@aws-cdk/aws-sqs": "^0.29.0", | ||
"@aws-cdk/aws-stepfunctions": "^0.29.0", | ||
"@aws-cdk/cdk": "^0.29.0", | ||
"@aws-cdk/cx-api": "^0.29.0" | ||
}, | ||
@@ -116,2 +118,2 @@ "engines": { | ||
} | ||
} | ||
} |
@@ -43,2 +43,12 @@ ## AWS Lambda Construct Library | ||
## Event Rule Target | ||
You can use an AWS Lambda function as a target for an Amazon CloudWatch event | ||
rule: | ||
```ts | ||
import targets = require('@aws-cdk/aws-events-targets'); | ||
rule.addTarget(new targets.LambdaFunction(myFunction)); | ||
``` | ||
### Event Sources | ||
@@ -45,0 +55,0 @@ |
@@ -136,3 +136,14 @@ "use strict"; | ||
Value: { | ||
Ref: "Alias325C5727" | ||
'Fn::Join': [ | ||
'', | ||
[ | ||
{ | ||
"Fn::GetAtt": [ | ||
"MyLambdaCCE802FB", | ||
"Arn" | ||
] | ||
}, | ||
':prod' | ||
] | ||
] | ||
} | ||
@@ -192,2 +203,2 @@ }] | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5hbGlhcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QuYWxpYXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDRDQUFnRztBQUNoRyxzREFBdUQ7QUFDdkQsc0NBQXFDO0FBRXJDLGlDQUFrQztBQUVsQyxpQkFBUztJQUNQLHFCQUFxQixDQUFDLElBQVU7UUFDOUIsTUFBTSxLQUFLLEdBQUcsSUFBSSxXQUFLLEVBQUUsQ0FBQztRQUMxQixNQUFNLEVBQUUsR0FBRyxJQUFJLE1BQU0sQ0FBQyxRQUFRLENBQUMsS0FBSyxFQUFFLFVBQVUsRUFBRTtZQUNoRCxJQUFJLEVBQUUsSUFBSSxNQUFNLENBQUMsVUFBVSxDQUFDLFNBQVMsQ0FBQztZQ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jo6U2VsZWN0XCI6IFtcbiAgICAgICAgICAgICAgNixcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIFwiRm46OlNwbGl0XCI6IFtcbiAgICAgICAgICAgICAgICAgIFwiOlwiLFxuICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICBSZWY6IFwiQWxpYXMzMjVDNTcyN1wiXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICBdXG4gICAgICAgICAgfSxcbiAgICAgICAgICBcIjpwcm9kXCJcbiAgICAgICAgXVxuICAgICAgXVxuICAgIH0pO1xuXG4gICAgdGVzdC5kb25lKCk7XG4gIH1cbn07XG4iXX0= |
@@ -13,3 +13,9 @@ import { Test } from 'nodeunit'; | ||
}; | ||
'lambda.Code.cfnParameters': { | ||
"automatically creates the Bucket and Key parameters when it's used in a Function"(test: Test): void; | ||
'does not allow accessing the Parameter properties before being used in a Function'(test: Test): void; | ||
'allows passing custom Parameters when creating it'(test: Test): void; | ||
'can assign parameters'(test: Test): void; | ||
}; | ||
}; | ||
export = _default; |
@@ -94,4 +94,90 @@ "use strict"; | ||
} | ||
} | ||
}, | ||
'lambda.Code.cfnParameters': { | ||
"automatically creates the Bucket and Key parameters when it's used in a Function"(test) { | ||
const stack = new cdk.Stack(); | ||
const code = new lambda.CfnParametersCode(); | ||
new lambda.Function(stack, 'Function', { | ||
code, | ||
runtime: lambda.Runtime.NodeJS810, | ||
handler: 'index.handler', | ||
}); | ||
assert_1.expect(stack).to(assert_1.haveResourceLike('AWS::Lambda::Function', { | ||
Code: { | ||
S3Bucket: { | ||
Ref: "FunctionLambdaSourceBucketNameParameter9E9E108F", | ||
}, | ||
S3Key: { | ||
Ref: "FunctionLambdaSourceObjectKeyParameter1C7AED11", | ||
}, | ||
}, | ||
})); | ||
test.equal(stack.node.resolve(code.bucketNameParam), 'FunctionLambdaSourceBucketNameParameter9E9E108F'); | ||
test.equal(stack.node.resolve(code.objectKeyParam), 'FunctionLambdaSourceObjectKeyParameter1C7AED11'); | ||
test.done(); | ||
}, | ||
'does not allow accessing the Parameter properties before being used in a Function'(test) { | ||
const code = new lambda.CfnParametersCode(); | ||
test.throws(() => { | ||
test.notEqual(code.bucketNameParam, undefined); | ||
}, /bucketNameParam/); | ||
test.throws(() => { | ||
test.notEqual(code.objectKeyParam, undefined); | ||
}, /objectKeyParam/); | ||
test.done(); | ||
}, | ||
'allows passing custom Parameters when creating it'(test) { | ||
const stack = new cdk.Stack(); | ||
const bucketNameParam = new cdk.CfnParameter(stack, 'BucketNameParam', { | ||
type: 'String', | ||
}); | ||
const bucketKeyParam = new cdk.CfnParameter(stack, 'ObjectKeyParam', { | ||
type: 'String', | ||
}); | ||
const code = lambda.Code.cfnParameters({ | ||
bucketNameParam, | ||
objectKeyParam: bucketKeyParam, | ||
}); | ||
test.equal(stack.node.resolve(code.bucketNameParam), 'BucketNameParam'); | ||
test.equal(stack.node.resolve(code.objectKeyParam), 'ObjectKeyParam'); | ||
new lambda.Function(stack, 'Function', { | ||
code, | ||
runtime: lambda.Runtime.NodeJS810, | ||
handler: 'index.handler', | ||
}); | ||
assert_1.expect(stack).to(assert_1.haveResourceLike('AWS::Lambda::Function', { | ||
Code: { | ||
S3Bucket: { | ||
Ref: "BucketNameParam", | ||
}, | ||
S3Key: { | ||
Ref: "ObjectKeyParam", | ||
}, | ||
}, | ||
})); | ||
test.done(); | ||
}, | ||
'can assign parameters'(test) { | ||
// given | ||
const stack = new cdk.Stack(); | ||
const code = new lambda.CfnParametersCode({ | ||
bucketNameParam: new cdk.CfnParameter(stack, 'BucketNameParam', { | ||
type: 'String', | ||
}), | ||
objectKeyParam: new cdk.CfnParameter(stack, 'ObjectKeyParam', { | ||
type: 'String', | ||
}), | ||
}); | ||
// when | ||
const overrides = stack.node.resolve(code.assign({ | ||
bucketName: 'SomeBucketName', | ||
objectKey: 'SomeObjectKey', | ||
})); | ||
// then | ||
test.equal(overrides['BucketNameParam'], 'SomeBucketName'); | ||
test.equal(overrides['ObjectKeyParam'], 'SomeObjectKey'); | ||
test.done(); | ||
}, | ||
}, | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5jb2RlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidGVzdC5jb2RlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSw0Q0FBcUU7QUFDckUsMENBQTJDO0FBQzNDLG9DQUFxQztBQUNyQyx5Q0FBMEM7QUFFMUMsNkJBQThCO0FBQzlCLGlDQUFrQztBQTRGbEMsU0FBUyxjQUFjLENBQUMsSUFBaUIsRUFBRSxVQUEwQixNQUFNLENBQUMsT0FBTyxDQUFDLFNBQVM7SUFDM0YsTUFBTSxLQUFLLEdBQUcsSUFBSSxHQUFHLENBQUMsS0FBSyxFQUFFLENBQUM7SUFDOUIsT0FBTyxJQUFJLE1BQU0sQ0FBQyxRQUFRLENBQUMsS0FBSyxFQUFFLE1BQU0sRUFBRTtRQUN4QyxPQUFPLEVBQUUsTUFBTTtRQUNmLElBQUksRUFBRSxPQUFPO0tBQ2QsQ0FBQyxDQUFDO0FBQ0wsQ0FBQztBQUVELFNBQVMsb0JBQW9CLENBQUMsS0FBYTtJQUN6QyxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUM7SUFDWCxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsS0FBSyxFQUFFLEVBQUUsQ0FBQyxFQUFFO1FBQzlCLENBQUMsSUFBSSxNQUFNLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLEdBQUcsQ0FBQyxDQUFDLENBQUM7S0FDM0Q7SUFDRCxPQUFPLENBQUMsQ0FBQztBQUNYLENBQUM7QUF4R0QsaUJBQVM7SUFDUCxvQ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tYmRhLlJ1bnRpbWUgPSBsYW1iZGEuUnVudGltZS5Ob2RlSlM4MTApIHtcbiAgY29uc3Qgc3RhY2sgPSBuZXcgY2RrLlN0YWNrKCk7XG4gIHJldHVybiBuZXcgbGFtYmRhLkZ1bmN0aW9uKHN0YWNrLCAnRnVuYycsIHtcbiAgICBoYW5kbGVyOiAnZm9vbScsXG4gICAgY29kZSwgcnVudGltZVxuICB9KTtcbn1cblxuZnVuY3Rpb24gZ2VuZXJhdGVSYW5kb21TdHJpbmcoYnl0ZXM6IG51bWJlcikge1xuICBsZXQgcyA9ICcnO1xuICBmb3IgKGxldCBpID0gMDsgaSA8IGJ5dGVzOyArK2kpIHtcbiAgICBzICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoTWF0aC5yb3VuZChNYXRoLnJhbmRvbSgpICogMjU2KSk7XG4gIH1cbiAgcmV0dXJuIHM7XG59XG4iXX0= |
@@ -14,3 +14,2 @@ import { Test } from 'nodeunit'; | ||
}; | ||
'Lambda can serve as EventRule target, permission gets added'(test: Test): void; | ||
'Lambda code can be read from a local directory via an asset'(test: Test): void; | ||
@@ -17,0 +16,0 @@ 'default function with SQS DLQ when client sets deadLetterQueueEnabled to true and functionName defined by client'(test: Test): void; |
@@ -9,3 +9,4 @@ import { Test } from 'nodeunit'; | ||
'responds with FAILED on error'(test: Test): Promise<void>; | ||
'does not fail when operations on provider log group fail'(test: Test): Promise<void>; | ||
}; | ||
export = _default; |
@@ -36,7 +36,11 @@ "use strict"; | ||
AWS.mock('CloudWatchLogs', 'deleteRetentionPolicy', deleteRetentionPolicyFake); | ||
const event = Object.assign({}, eventCommon, { RequestType: 'Create', ResourceProperties: { | ||
const event = { | ||
...eventCommon, | ||
RequestType: 'Create', | ||
ResourceProperties: { | ||
ServiceToken: 'token', | ||
RetentionInDays: '30', | ||
LogGroupName: 'group' | ||
} }); | ||
} | ||
}; | ||
const request = createRequest('SUCCESS'); | ||
@@ -71,11 +75,16 @@ await provider.handler(event, context); | ||
AWS.mock('CloudWatchLogs', 'deleteRetentionPolicy', deleteRetentionPolicyFake); | ||
const event = Object.assign({}, eventCommon, { RequestType: 'Update', ResourceProperties: { | ||
const event = { | ||
...eventCommon, | ||
RequestType: 'Update', | ||
ResourceProperties: { | ||
ServiceToken: 'token', | ||
RetentionInDays: '365', | ||
LogGroupName: 'group' | ||
}, OldResourceProperties: { | ||
}, | ||
OldResourceProperties: { | ||
ServiceToken: 'token', | ||
LogGroupName: 'group', | ||
RetentionInDays: '30' | ||
} }); | ||
} | ||
}; | ||
const request = createRequest('SUCCESS'); | ||
@@ -103,10 +112,16 @@ await provider.handler(event, context); | ||
AWS.mock('CloudWatchLogs', 'deleteRetentionPolicy', deleteRetentionPolicyFake); | ||
const event = Object.assign({}, eventCommon, { RequestType: 'Update', PhysicalResourceId: 'group', ResourceProperties: { | ||
const event = { | ||
...eventCommon, | ||
RequestType: 'Update', | ||
PhysicalResourceId: 'group', | ||
ResourceProperties: { | ||
ServiceToken: 'token', | ||
LogGroupName: 'group' | ||
}, OldResourceProperties: { | ||
}, | ||
OldResourceProperties: { | ||
ServiceToken: 'token', | ||
LogGroupName: 'group', | ||
RetentionInDays: '365' | ||
} }); | ||
} | ||
}; | ||
const request = createRequest('SUCCESS'); | ||
@@ -130,6 +145,11 @@ await provider.handler(event, context); | ||
AWS.mock('CloudWatchLogs', 'deleteRetentionPolicy', deleteRetentionPolicyFake); | ||
const event = Object.assign({}, eventCommon, { RequestType: 'Delete', PhysicalResourceId: 'group', ResourceProperties: { | ||
const event = { | ||
...eventCommon, | ||
RequestType: 'Delete', | ||
PhysicalResourceId: 'group', | ||
ResourceProperties: { | ||
ServiceToken: 'token', | ||
LogGroupName: 'group' | ||
} }); | ||
} | ||
}; | ||
const request = createRequest('SUCCESS'); | ||
@@ -146,7 +166,11 @@ await provider.handler(event, context); | ||
AWS.mock('CloudWatchLogs', 'createLogGroup', createLogGroupFake); | ||
const event = Object.assign({}, eventCommon, { RequestType: 'Create', ResourceProperties: { | ||
const event = { | ||
...eventCommon, | ||
RequestType: 'Create', | ||
ResourceProperties: { | ||
ServiceToken: 'token', | ||
RetentionInDays: '30', | ||
LogGroupName: 'group' | ||
} }); | ||
} | ||
}; | ||
const request = createRequest('FAILED'); | ||
@@ -157,3 +181,29 @@ await provider.handler(event, context); | ||
}, | ||
async 'does not fail when operations on provider log group fail'(test) { | ||
const createLogGroupFake = (params) => { | ||
if (params.logGroupName === '/aws/lambda/provider') { | ||
return Promise.reject(new Error('OperationAbortedException')); | ||
} | ||
return Promise.resolve({}); | ||
}; | ||
const putRetentionPolicyFake = sinon.fake.resolves({}); | ||
const deleteRetentionPolicyFake = sinon.fake.resolves({}); | ||
AWS.mock('CloudWatchLogs', 'createLogGroup', createLogGroupFake); | ||
AWS.mock('CloudWatchLogs', 'putRetentionPolicy', putRetentionPolicyFake); | ||
AWS.mock('CloudWatchLogs', 'deleteRetentionPolicy', deleteRetentionPolicyFake); | ||
const event = { | ||
...eventCommon, | ||
RequestType: 'Create', | ||
ResourceProperties: { | ||
ServiceToken: 'token', | ||
RetentionInDays: '30', | ||
LogGroupName: 'group' | ||
} | ||
}; | ||
const request = createRequest('SUCCESS'); | ||
await provider.handler(event, context); | ||
test.equal(request.isDone(), true); | ||
test.done(); | ||
} | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5sb2ctcmV0ZW50aW9uLXByb3ZpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidGVzdC5sb2ctcmV0ZW50aW9uLXByb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxvQ0FBcUM7QUFDckMsNkJBQThCO0FBRTlCLCtCQUFnQztBQUNoQywwREFBMkQ7QUFFM0QsTUFBTSxXQUFXLEdBQUc7SUFDbEIsWUFBWSxFQUFFLE9BQU87SUFDckIsV0FBVyxFQUFFLG1CQUFtQjtJQUNoQyxPQUFPLEV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aW9uQ3VzdG9tUmVzb3VyY2VDcmVhdGVFdmVudCwgY29udGV4dCk7XG5cbiAgICB0ZXN0LmVxdWFsKHJlcXVlc3QuaXNEb25lKCksIHRydWUpO1xuXG4gICAgdGVzdC5kb25lKCk7XG4gIH1cbn07XG4iXX0= |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
129
1014730
24
81
+ Added@aws-cdk/assets@0.29.0(transitive)
+ Added@aws-cdk/aws-autoscaling-api@0.29.0(transitive)
+ Added@aws-cdk/aws-cloudwatch@0.29.0(transitive)
+ Added@aws-cdk/aws-ec2@0.29.0(transitive)
+ Added@aws-cdk/aws-events@0.29.0(transitive)
+ Added@aws-cdk/aws-iam@0.29.0(transitive)
+ Added@aws-cdk/aws-kms@0.29.0(transitive)
+ Added@aws-cdk/aws-logs@0.29.0(transitive)
+ Added@aws-cdk/aws-s3@0.29.0(transitive)
+ Added@aws-cdk/aws-s3-notifications@0.29.0(transitive)
+ Added@aws-cdk/aws-sqs@0.29.0(transitive)
+ Added@aws-cdk/aws-stepfunctions@0.29.0(transitive)
+ Added@aws-cdk/cdk@0.29.0(transitive)
+ Added@aws-cdk/cx-api@0.29.0(transitive)
+ Added@aws-cdk/region-info@0.29.0(transitive)
- Removed@aws-cdk/assets@0.28.0(transitive)
- Removed@aws-cdk/aws-autoscaling-api@0.28.0(transitive)
- Removed@aws-cdk/aws-cloudwatch@0.28.0(transitive)
- Removed@aws-cdk/aws-ec2@0.28.0(transitive)
- Removed@aws-cdk/aws-events@0.28.0(transitive)
- Removed@aws-cdk/aws-iam@0.28.0(transitive)
- Removed@aws-cdk/aws-kms@0.28.0(transitive)
- Removed@aws-cdk/aws-logs@0.28.0(transitive)
- Removed@aws-cdk/aws-s3@0.28.0(transitive)
- Removed@aws-cdk/aws-s3-notifications@0.28.0(transitive)
- Removed@aws-cdk/aws-sqs@0.28.0(transitive)
- Removed@aws-cdk/aws-stepfunctions@0.28.0(transitive)
- Removed@aws-cdk/cdk@0.28.0(transitive)
- Removed@aws-cdk/cx-api@0.28.0(transitive)
- Removed@aws-cdk/region-info@0.28.0(transitive)
Updated@aws-cdk/assets@^0.29.0
Updated@aws-cdk/aws-ec2@^0.29.0
Updated@aws-cdk/aws-events@^0.29.0
Updated@aws-cdk/aws-iam@^0.29.0
Updated@aws-cdk/aws-logs@^0.29.0
Updated@aws-cdk/aws-s3@^0.29.0
Updated@aws-cdk/aws-sqs@^0.29.0
Updated@aws-cdk/cdk@^0.29.0
Updated@aws-cdk/cx-api@^0.29.0