@aws-cdk/aws-lambda
Advanced tools
Comparing version 0.21.0 to 0.22.0
import iam = require('@aws-cdk/aws-iam'); | ||
import cdk = require('@aws-cdk/cdk'); | ||
import { FunctionRef } from './lambda-ref'; | ||
import { FunctionVersion } from './lambda-version'; | ||
import { FunctionBase, FunctionImportProps } from './lambda-ref'; | ||
import { Version } from './lambda-version'; | ||
import { Permission } from './permission'; | ||
@@ -21,3 +21,3 @@ /** | ||
*/ | ||
version: FunctionVersion; | ||
version: Version; | ||
/** | ||
@@ -49,3 +49,3 @@ * Name of this alias | ||
*/ | ||
export declare class Alias extends FunctionRef { | ||
export declare class Alias extends FunctionBase { | ||
/** | ||
@@ -68,3 +68,3 @@ * ARN of this alias | ||
*/ | ||
readonly role?: iam.Role | undefined; | ||
readonly role?: iam.IRole | undefined; | ||
protected readonly canCreatePermissions: boolean; | ||
@@ -75,3 +75,4 @@ /** | ||
private readonly underlyingLambda; | ||
constructor(parent: cdk.Construct, name: string, props: AliasProps); | ||
constructor(scope: cdk.Construct, id: string, props: AliasProps); | ||
export(): FunctionImportProps; | ||
addPermission(name: string, permission: Permission): void; | ||
@@ -96,3 +97,3 @@ /** | ||
*/ | ||
readonly version: FunctionVersion; | ||
readonly version: Version; | ||
/** | ||
@@ -99,0 +100,0 @@ * How much weight to assign to this version (0..1) |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const cdk = require("@aws-cdk/cdk"); | ||
const lambda_ref_1 = require("./lambda-ref"); | ||
@@ -8,5 +9,5 @@ const lambda_generated_1 = require("./lambda.generated"); | ||
*/ | ||
class Alias extends lambda_ref_1.FunctionRef { | ||
constructor(parent, name, props) { | ||
super(parent, name); | ||
class Alias extends lambda_ref_1.FunctionBase { | ||
constructor(scope, id, props) { | ||
super(scope, id); | ||
this.canCreatePermissions = true; // Not used anyway | ||
@@ -26,2 +27,7 @@ this.underlyingLambda = props.version.lambda; | ||
} | ||
export() { | ||
return { | ||
functionArn: new cdk.Output(this, 'AliasArn', { value: this.functionArn }).makeImportValue().toString() | ||
}; | ||
} | ||
addPermission(name, permission) { | ||
@@ -66,2 +72,2 @@ // Forward addPermission() to the underlying Lambda object | ||
exports.Alias = Alias; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxpYXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJhbGlhcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBLDZDQUEyQztBQUUzQyx5REFBOEM7QUE4QzlDOztHQUVHO0FBQ0gsTUFBYSxLQUFNLFNBQVEsd0JBQVc7SUE2QnBDLFlBQVksTUFBcUIsRUFBRSxJQUFZLEVBQUUsS0FBaUI7UUFDaEUsS0FBSyxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsQ0FBQztRQVJILHlCQUFvQixHQUFZLElBQUksQ0FBQyxDQUFDLGtCQUFrQjtRQVV6RSxJQUFJLENBQUMsZ0JBQWdCLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUM7UUFFN0MsTUFBTSxLQUFLLEdBQUcsSUFBSSwyQkFBUSxDQUFDLElBQUksRUFBRSxVQUFVLEVBQUU7WUFDM0MsSUFBSSxFQUFFLEtBQUssQ0FBQyxTQUFTO1lBQ3JCLFdBQVcsRUFBRSxLQUFLLENBQUMsV0FBVztZQUM5QixZQUFZLEVBQUUsSUFBSSxDQUFDLGdCQUFnQixDQUFDLFlBQVk7WUFDaEQsZUFBZSxFQUFFLEtBQUssQ0FBQyxPQUFPLENBQUMsZUFBZTtZQUM5QyxhQUFhLEVBQUUsSUFBSSxDQUFDLHNCQUFzQixDQUFDLEtBQUssQ0FBQztTQUNsRCxDQUFDLENBQUM7UUFFSCw4REFBOEQ7UUFDOUQsZ0VBQWdFO1FBQ2hFLElBQUksQ0FBQyxZQUFZLEdBQUcsS0FBSyxDQUFDLEdBQUcsQ0FBQztRQUM5QixJQUFJLENBQUMsV0FBVyx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JlYWRvbmx5IHZlcnNpb246IFZlcnNpb247XG5cbiAgLyoqXG4gICAqIEhvdyBtdWNoIHdlaWdodCB0byBhc3NpZ24gdG8gdGhpcyB2ZXJzaW9uICgwLi4xKVxuICAgKi9cbiAgcmVhZG9ubHkgd2VpZ2h0OiBudW1iZXI7XG59XG4iXX0= |
@@ -12,3 +12,3 @@ import assets = require('@aws-cdk/assets'); | ||
*/ | ||
static bucket(bucket: s3.BucketRef, key: string, objectVersion?: string): S3Code; | ||
static bucket(bucket: s3.IBucket, key: string, objectVersion?: string): S3Code; | ||
/** | ||
@@ -41,3 +41,3 @@ * @returns `LambdaInlineCode` with inline code. | ||
*/ | ||
abstract toJSON(): CfnFunction.CodeProperty; | ||
abstract toJSON(resource: CfnFunction): CfnFunction.CodeProperty; | ||
/** | ||
@@ -56,4 +56,4 @@ * Called when the lambda is initialized to allow this object to | ||
private bucketName; | ||
constructor(bucket: s3.BucketRef, key: string, objectVersion?: string | undefined); | ||
toJSON(): CfnFunction.CodeProperty; | ||
constructor(bucket: s3.IBucket, key: string, objectVersion?: string | undefined); | ||
toJSON(_: CfnFunction): CfnFunction.CodeProperty; | ||
} | ||
@@ -67,3 +67,3 @@ /** | ||
bind(lambda: Func): void; | ||
toJSON(): CfnFunction.CodeProperty; | ||
toJSON(_: CfnFunction): CfnFunction.CodeProperty; | ||
} | ||
@@ -86,3 +86,3 @@ /** | ||
bind(lambda: Func): void; | ||
toJSON(): CfnFunction.CodeProperty; | ||
toJSON(resource: CfnFunction): CfnFunction.CodeProperty; | ||
} |
@@ -68,3 +68,3 @@ "use strict"; | ||
} | ||
toJSON() { | ||
toJSON(_) { | ||
return { | ||
@@ -94,3 +94,3 @@ s3Bucket: this.bucketName, | ||
} | ||
toJSON() { | ||
toJSON(_) { | ||
return { | ||
@@ -134,3 +134,5 @@ zipFile: this.code | ||
} | ||
toJSON() { | ||
toJSON(resource) { | ||
// https://github.com/awslabs/aws-cdk/issues/1432 | ||
this.asset.addResourceMetadata(res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GVmaW5lZCkge1xuICAgICAgdGhpcy5wYWNrYWdpbmcgPSBwYWNrYWdpbmc7XG4gICAgfSBlbHNlIHtcbiAgICAgIHRoaXMucGFja2FnaW5nID0gZnMubHN0YXRTeW5jKHBhdGgpLmlzRGlyZWN0b3J5KClcbiAgICAgID8gYXNzZXRzLkFzc2V0UGFja2FnaW5nLlppcERpcmVjdG9yeVxuICAgICAgOiBhc3NldHMuQXNzZXRQYWNrYWdpbmcuRmlsZTtcbiAgICB9XG4gIH1cblxuICBwdWJsaWMgYmluZChsYW1iZGE6IEZ1bmMpIHtcbiAgICAvLyBJZiB0aGUgc2FtZSBBc3NldENvZGUgaXMgdXNlZCBtdWx0aXBsZSB0aW1lcywgcmV0YWluIG9ubHkgdGhlIGZpcnN0IGluc3RhbnRpYXRpb24uXG4gICAgaWYgKCF0aGlzLmFzc2V0KSB7XG4gICAgICB0aGlzLmFzc2V0ID0gbmV3IGFzc2V0cy5Bc3NldChsYW1iZGEsICdDb2RlJywge1xuICAgICAgICBwYXRoOiB0aGlzLnBhdGgsXG4gICAgICAgIHBhY2thZ2luZzogdGhpcy5wYWNrYWdpbmdcbiAgICAgIH0pO1xuICAgIH1cblxuICAgIGlmICghdGhpcy5hc3NldC5pc1ppcEFyY2hpdmUpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgQXNzZXQgbXVzdCBiZSBhIC56aXAgZmlsZSBvciBhIGRpcmVjdG9yeSAoJHt0aGlzLnBhdGh9KWApO1xuICAgIH1cbiAgfVxuXG4gIHB1YmxpYyB0b0pTT04oKTogQ2ZuRnVuY3Rpb24uQ29kZVByb3BlcnR5IHtcbiAgICByZXR1cm4gIHtcbiAgICAgIHMzQnVja2V0OiB0aGlzLmFzc2V0IS5zM0J1Y2tldE5hbWUsXG4gICAgICBzM0tleTogdGhpcy5hc3NldCEuczNPYmplY3RLZXlcbiAgICB9O1xuICB9XG59XG4iXX0= | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozL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9hd3NsYWJzL2F3cy1jZGsvaXNzdWVzLzE0MzJcbiAgICB0aGlzLmFzc2V0IS5hZGRSZXNvdXJjZU1ldGFkYXRhKHJlc291cmNlLCAnQ29kZScpO1xuXG4gICAgcmV0dXJuICB7XG4gICAgICBzM0J1Y2tldDogdGhpcy5hc3NldCEuczNCdWNrZXROYW1lLFxuICAgICAgczNLZXk6IHRoaXMuYXNzZXQhLnMzT2JqZWN0S2V5XG4gICAgfTtcbiAgfVxufVxuIl19 |
import cdk = require('@aws-cdk/cdk'); | ||
import { FunctionRef } from './lambda-ref'; | ||
import { IFunction } from './lambda-ref'; | ||
export interface EventSourceMappingProps { | ||
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
target: FunctionRef; | ||
target: IFunction; | ||
/** | ||
@@ -52,3 +52,3 @@ * The largest number of records that AWS Lambda will retrieve from your event | ||
export declare class EventSourceMapping extends cdk.Construct { | ||
constructor(parent: cdk.Construct, id: string, props: EventSourceMappingProps); | ||
constructor(scope: cdk.Construct, id: string, props: EventSourceMappingProps); | ||
} | ||
@@ -55,0 +55,0 @@ /** |
@@ -18,4 +18,4 @@ "use strict"; | ||
class EventSourceMapping extends cdk.Construct { | ||
constructor(parent, id, props) { | ||
super(parent, id); | ||
constructor(scope, id, props) { | ||
super(scope, id); | ||
new lambda_generated_1.CfnEventSourceMapping(this, 'Resource', { | ||
@@ -48,2 +48,2 @@ batchSize: props.batchSize, | ||
})(StartingPosition = exports.StartingPosition || (exports.StartingPosition = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtc291cmNlLW1hcHBpbmcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJldmVudC1zb3VyY2UtbWFwcGluZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLG9DQUFxQztBQUVyQyx5REFBMkQ7QUEwQzNEOzs7Ozs7Ozs7OztHQVdHO0FBQ0gsTUFBYSx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SBEeW5hbW9EQiBvciBLaW5lc2lzIHN0cmVhbSB3aGVyZSBBV1MgTGFtYmRhIHNob3VsZCBzdGFydFxuICogcmVhZGluZy5cbiAqL1xuZXhwb3J0IGVudW0gU3RhcnRpbmdQb3NpdGlvbiB7XG4gIC8qKlxuICAgKiBTdGFydCByZWFkaW5nIGF0IHRoZSBsYXN0IHVudHJpbW1lZCByZWNvcmQgaW4gdGhlIHNoYXJkIGluIHRoZSBzeXN0ZW0sXG4gICAqIHdoaWNoIGlzIHRoZSBvbGRlc3QgZGF0YSByZWNvcmQgaW4gdGhlIHNoYXJkLlxuICAgKi9cbiAgVHJpbUhvcml6b24gPSAnVFJJTV9IT1JJWk9OJyxcblxuICAvKipcbiAgICogU3RhcnQgcmVhZGluZyBqdXN0IGFmdGVyIHRoZSBtb3N0IHJlY2VudCByZWNvcmQgaW4gdGhlIHNoYXJkLCBzbyB0aGF0IHlvdVxuICAgKiBhbHdheXMgcmVhZCB0aGUgbW9zdCByZWNlbnQgZGF0YSBpbiB0aGUgc2hhcmRcbiAgICovXG4gIExhdGVzdCA9ICdMQVRFU1QnLFxufVxuIl19 |
@@ -1,2 +0,2 @@ | ||
import { FunctionRef } from './lambda-ref'; | ||
import { FunctionBase } from './lambda-ref'; | ||
/** | ||
@@ -11,3 +11,3 @@ * An abstract class which represents an AWS Lambda event source. | ||
*/ | ||
bind(target: FunctionRef): void; | ||
bind(target: FunctionBase): void; | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnQtc291cmNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZXZlbnQtc291cmNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBGdW5jdGlvblJlZiB9IGZyb20gJy4vbGFtYmRhLXJlZic7XG5cbi8q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0aW9uQmFzZSk6IHZvaWQ7XG59XG4iXX0= |
@@ -13,80 +13,105 @@ import cloudwatch = require('@aws-cdk/aws-cloudwatch'); | ||
import { CommonPipelineInvokeActionProps, PipelineInvokeAction } from './pipeline-action'; | ||
/** | ||
* Represents a Lambda function defined outside of this stack. | ||
*/ | ||
export interface FunctionRefProps { | ||
export interface IFunction extends cdk.IConstruct, events.IEventRuleTarget, logs.ILogSubscriptionDestination, s3n.IBucketNotificationDestination, ec2.IConnectable, stepfunctions.IStepFunctionsTaskResource { | ||
/** | ||
* The ARN of the Lambda function. | ||
* | ||
* Format: arn:<partition>:lambda:<region>:<account-id>:function:<function-name> | ||
* Logical ID of this Function. | ||
*/ | ||
functionArn: string; | ||
readonly id: string; | ||
/** | ||
* The IAM execution role associated with this function. | ||
* | ||
* If the role is not specified, any role-related operations will no-op. | ||
* The name of the function. | ||
*/ | ||
role?: iam.Role; | ||
readonly functionName: string; | ||
/** | ||
* Id of the securityGroup for this Lambda, if in a VPC. | ||
* The ARN fo the function. | ||
*/ | ||
readonly functionArn: string; | ||
/** | ||
* The IAM role associated with this function. | ||
*/ | ||
readonly role?: iam.IRole; | ||
/** | ||
* Whether or not this Lambda function was bound to a VPC | ||
* | ||
* This needs to be given in order to support allowing connections | ||
* to this Lambda. | ||
* If this is is `false`, trying to access the `connections` object will fail. | ||
*/ | ||
securityGroupId?: string; | ||
} | ||
export declare abstract class FunctionRef extends cdk.Construct implements events.IEventRuleTarget, logs.ILogSubscriptionDestination, s3n.IBucketNotificationDestination, ec2.IConnectable, stepfunctions.IStepFunctionsTaskResource { | ||
readonly isBoundToVpc: boolean; | ||
/** | ||
* Creates a Lambda function object which represents a function not defined | ||
* within this stack. | ||
* Adds a permission to the Lambda resource policy. | ||
* @param id The id ƒor the permission construct | ||
*/ | ||
addPermission(id: string, permission: Permission): void; | ||
/** | ||
* Convenience method for creating a new {@link PipelineInvokeAction}, | ||
* and adding it to the given Stage. | ||
* | ||
* Lambda.import(this, 'MyImportedFunction', { lambdaArn: new LambdaArn('arn:aws:...') }); | ||
* | ||
* @param parent The parent construct | ||
* @param name The name of the lambda construct | ||
* @param ref A reference to a Lambda function. Can be created manually (see | ||
* example above) or obtained through a call to `lambda.export()`. | ||
* @param stage the Pipeline Stage to add the new Action to | ||
* @param name the name of the newly created Action | ||
* @param props the properties of the new Action | ||
* @returns the newly created {@link PipelineInvokeAction} | ||
*/ | ||
static import(parent: cdk.Construct, name: string, ref: FunctionRefProps): FunctionRef; | ||
addToPipeline(stage: codepipeline.IStage, name: string, props?: CommonPipelineInvokeActionProps): PipelineInvokeAction; | ||
addToRolePolicy(statement: iam.PolicyStatement): void; | ||
/** | ||
* Grant the given identity permissions to invoke this Lambda | ||
*/ | ||
grantInvoke(identity?: iam.IPrincipal): void; | ||
/** | ||
* Return the given named metric for this Lambda | ||
*/ | ||
static metricAll(metricName: string, props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metric(metricName: string, props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Metric for the number of Errors executing all Lambdas | ||
* Metric for the Errors executing this Lambda | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllErrors(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricErrors(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Metric for the Duration executing all Lambdas | ||
* Metric for the Duration of this Lambda | ||
* | ||
* @default average over 5 minutes | ||
*/ | ||
static metricAllDuration(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricDuration(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Metric for the number of invocations of all Lambdas | ||
* Metric for the number of invocations of this Lambda | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllInvocations(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricInvocations(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Metric for the number of throttled invocations of all Lambdas | ||
* Metric for the number of throttled invocations of this Lambda | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllThrottles(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
metricThrottles(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Metric for the number of concurrent executions across all Lambdas | ||
* Export this Function (without the role) | ||
*/ | ||
export(): FunctionImportProps; | ||
addEventSource(source: IEventSource): void; | ||
} | ||
/** | ||
* Represents a Lambda function defined outside of this stack. | ||
*/ | ||
export interface FunctionImportProps { | ||
/** | ||
* The ARN of the Lambda function. | ||
* | ||
* @default max over 5 minutes | ||
* Format: arn:<partition>:lambda:<region>:<account-id>:function:<function-name> | ||
*/ | ||
static metricAllConcurrentExecutions(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
functionArn: string; | ||
/** | ||
* Metric for the number of unreserved concurrent executions across all Lambdas | ||
* The IAM execution role associated with this function. | ||
* | ||
* @default max over 5 minutes | ||
* If the role is not specified, any role-related operations will no-op. | ||
*/ | ||
static metricAllUnreservedConcurrentExecutions(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
role?: iam.IRole; | ||
/** | ||
* Id of the securityGroup for this Lambda, if in a VPC. | ||
* | ||
* This needs to be given in order to support allowing connections | ||
* to this Lambda. | ||
*/ | ||
securityGroupId?: string; | ||
} | ||
export declare abstract class FunctionBase extends cdk.Construct implements IFunction { | ||
/** | ||
* The name of the function. | ||
@@ -102,3 +127,3 @@ */ | ||
*/ | ||
abstract readonly role?: iam.Role; | ||
abstract readonly role?: iam.IRole; | ||
/** | ||
@@ -125,2 +150,3 @@ * Whether the addPermission() call adds any permissions | ||
addPermission(id: string, permission: Permission): void; | ||
readonly id: string; | ||
/** | ||
@@ -186,7 +212,7 @@ * Convenience method for creating a new {@link PipelineInvokeAction}, | ||
metricThrottles(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
logSubscriptionDestination(sourceLogGroup: logs.LogGroupRef): logs.LogSubscriptionDestination; | ||
logSubscriptionDestination(sourceLogGroup: logs.ILogGroup): logs.LogSubscriptionDestination; | ||
/** | ||
* Export this Function (without the role) | ||
*/ | ||
export(): FunctionRefProps; | ||
abstract export(): FunctionImportProps; | ||
/** | ||
@@ -193,0 +219,0 @@ * Allows this Lambda to be used as a destination for bucket notifications. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const cloudwatch = require("@aws-cdk/aws-cloudwatch"); | ||
const ec2 = require("@aws-cdk/aws-ec2"); | ||
const iam = require("@aws-cdk/aws-iam"); | ||
@@ -10,3 +9,3 @@ const s3n = require("@aws-cdk/aws-s3-notifications"); | ||
const pipeline_action_1 = require("./pipeline-action"); | ||
class FunctionRef extends cdk.Construct { | ||
class FunctionBase extends cdk.Construct { | ||
constructor() { | ||
@@ -20,76 +19,2 @@ super(...arguments); | ||
/** | ||
* Creates a Lambda function object which represents a function not defined | ||
* within this stack. | ||
* | ||
* Lambda.import(this, 'MyImportedFunction', { lambdaArn: new LambdaArn('arn:aws:...') }); | ||
* | ||
* @param parent The parent construct | ||
* @param name The name of the lambda construct | ||
* @param ref A reference to a Lambda function. Can be created manually (see | ||
* example above) or obtained through a call to `lambda.export()`. | ||
*/ | ||
static import(parent, name, ref) { | ||
return new LambdaRefImport(parent, name, ref); | ||
} | ||
/** | ||
* Return the given named metric for this Lambda | ||
*/ | ||
static metricAll(metricName, props) { | ||
return new cloudwatch.Metric(Object.assign({ namespace: 'AWS/Lambda', metricName }, props)); | ||
} | ||
/** | ||
* Metric for the number of Errors executing all Lambdas | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllErrors(props) { | ||
return FunctionRef.metricAll('Errors', Object.assign({ statistic: 'sum' }, props)); | ||
} | ||
/** | ||
* Metric for the Duration executing all Lambdas | ||
* | ||
* @default average over 5 minutes | ||
*/ | ||
static metricAllDuration(props) { | ||
return FunctionRef.metricAll('Duration', props); | ||
} | ||
/** | ||
* Metric for the number of invocations of all Lambdas | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllInvocations(props) { | ||
return FunctionRef.metricAll('Invocations', Object.assign({ statistic: 'sum' }, props)); | ||
} | ||
/** | ||
* Metric for the number of throttled invocations of all Lambdas | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllThrottles(props) { | ||
return FunctionRef.metricAll('Throttles', Object.assign({ statistic: 'sum' }, props)); | ||
} | ||
/** | ||
* Metric for the number of concurrent executions across all Lambdas | ||
* | ||
* @default max over 5 minutes | ||
*/ | ||
static metricAllConcurrentExecutions(props) { | ||
// Mini-FAQ: why max? This metric is a gauge that is emitted every | ||
// minute, so either max or avg or a percentile make sense (but sum | ||
// doesn't). Max is more sensitive to spiky load changes which is | ||
// probably what you're interested in if you're looking at this metric | ||
// (Load spikes may lead to concurrent execution errors that would | ||
// otherwise not be visible in the avg) | ||
return FunctionRef.metricAll('ConcurrentExecutions', Object.assign({ statistic: 'max' }, props)); | ||
} | ||
/** | ||
* Metric for the number of unreserved concurrent executions across all Lambdas | ||
* | ||
* @default max over 5 minutes | ||
*/ | ||
static metricAllUnreservedConcurrentExecutions(props) { | ||
return FunctionRef.metricAll('UnreservedConcurrentExecutions', Object.assign({ statistic: 'max' }, props)); | ||
} | ||
/** | ||
* Adds a permission to the Lambda resource policy. | ||
@@ -114,2 +39,5 @@ * @param id The id ƒor the permission construct | ||
} | ||
get id() { | ||
return this.node.id; | ||
} | ||
/** | ||
@@ -159,3 +87,3 @@ * Convenience method for creating a new {@link PipelineInvokeAction}, | ||
const permissionId = `AllowEventRule${ruleId}`; | ||
if (!this.tryFindChild(permissionId)) { | ||
if (!this.node.tryFindChild(permissionId)) { | ||
this.addPermission(permissionId, { | ||
@@ -168,3 +96,3 @@ action: 'lambda:InvokeFunction', | ||
return { | ||
id: this.id, | ||
id: this.node.id, | ||
arn: this.functionArn, | ||
@@ -224,2 +152,3 @@ }; | ||
if (this.logSubscriptionDestinationPolicyAddedFor.indexOf(arn) === -1) { | ||
const stack = cdk.Stack.find(this); | ||
// NOTE: the use of {AWS::Region} limits this to the same region, which shouldn't really be an issue, | ||
@@ -230,3 +159,3 @@ // since the Lambda must be in the same region as the SubscriptionFilter anyway. | ||
this.addPermission('InvokedByCloudWatchLogs', { | ||
principal: new iam.ServicePrincipal(new cdk.FnConcat('logs.', new cdk.AwsRegion(), '.amazonaws.com').toString()), | ||
principal: new iam.ServicePrincipal(`logs.${stack.region}.amazonaws.com`), | ||
sourceArn: arn | ||
@@ -239,13 +168,2 @@ }); | ||
/** | ||
* Export this Function (without the role) | ||
*/ | ||
export() { | ||
return { | ||
functionArn: new cdk.Output(this, 'FunctionArn', { value: this.functionArn }).makeImportValue().toString(), | ||
securityGroupId: this._connections && this._connections.securityGroups[0] | ||
? new cdk.Output(this, 'SecurityGroupId', { value: this._connections.securityGroups[0].securityGroupId }).makeImportValue().toString() | ||
: undefined | ||
}; | ||
} | ||
/** | ||
* Allows this Lambda to be used as a destination for bucket notifications. | ||
@@ -256,5 +174,6 @@ * Use `bucket.onEvent(lambda)` to subscribe. | ||
const permissionId = `AllowBucketNotificationsFrom${bucketId}`; | ||
if (!this.tryFindChild(permissionId)) { | ||
const stack = cdk.Stack.find(this); | ||
if (!this.node.tryFindChild(permissionId)) { | ||
this.addPermission(permissionId, { | ||
sourceAccount: new cdk.AwsAccountId().toString(), | ||
sourceAccount: stack.accountId, | ||
principal: new iam.ServicePrincipal('s3.amazonaws.com'), | ||
@@ -266,3 +185,3 @@ sourceArn: bucketArn, | ||
// to the bucket notifications resource, so it will be created first. | ||
const permission = this.tryFindChild(permissionId); | ||
const permission = this.node.tryFindChild(permissionId); | ||
return { | ||
@@ -312,39 +231,7 @@ type: s3n.BucketNotificationDestinationType.Lambda, | ||
} | ||
throw new Error(`Invalid principal type for Lambda permission statement: ${JSON.stringify(cdk.resolve(principal))}. ` + | ||
throw new Error(`Invalid principal type for Lambda permission statement: ${JSON.stringify(this.node.resolve(principal))}. ` + | ||
'Supported: AccountPrincipal, ServicePrincipal'); | ||
} | ||
} | ||
exports.FunctionRef = FunctionRef; | ||
class LambdaRefImport extends FunctionRef { | ||
constructor(parent, name, props) { | ||
super(parent, name); | ||
this.canCreatePermissions = false; | ||
this.functionArn = props.functionArn; | ||
this.functionName = this.extractNameFromArn(props.functionArn); | ||
this.role = props.role; | ||
if (props.securityGroupId) { | ||
this._connections = new ec2.Connections({ | ||
securityGroups: [ec2.SecurityGroupRef.import(this, 'SecurityGroup', { | ||
securityGroupId: props.securityGroupId | ||
})] | ||
}); | ||
} | ||
} | ||
/** | ||
* Given an opaque (token) ARN, returns a CloudFormation expression that extracts the function | ||
* name from the ARN. | ||
* | ||
* Function ARNs look like this: | ||
* | ||
* arn:aws:lambda:region:account-id:function:function-name | ||
* | ||
* ..which means that in order to extract the `function-name` component from the ARN, we can | ||
* split the ARN using ":" and select the component in index 6. | ||
* | ||
* @returns `FnSelect(6, FnSplit(':', arn))` | ||
*/ | ||
extractNameFromArn(arn) { | ||
return new cdk.FnSelect(6, new cdk.FnSplit(':', arn)).toString(); | ||
} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFtYmRhLXJlZi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImxhbWJkYS1yZWYudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxzREFBdUQ7QUFFdkQsd0NBQXlDO0FBRXpDLHdDQUF5QztBQUV6QyxxREFBc0Q7QUFFdEQsb0NBQXFDO0FBRXJDLHlEQUFtRDtBQUVuRCx1REFBMEY7QUE2QjFGLE1BQXNCLFdBQVksU0FBUSxHQUFHLENBQUMsU0FBUztJQUF2RDs7UUFzSEU7O1dBRUc7UUFDSyw2Q0FBd0MsR0FBYSxFQUFFLENBQUM7SUE0UGxFLENBQUM7SUFqWEM7Ozs7Ozs7Ozs7T0FVRztJQUNJLE1BQU0sQ0FBQyxNQUFNLENBQUMsTUFBcUIsRUFB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ICAgIHJldHVybiAocHJpbmNpcGFsIGFzIGlhbS5TZXJ2aWNlUHJpbmNpcGFsKS5zZXJ2aWNlO1xuICAgIH1cblxuICAgIHRocm93IG5ldyBFcnJvcihgSW52YWxpZCBwcmluY2lwYWwgdHlwZSBmb3IgTGFtYmRhIHBlcm1pc3Npb24gc3RhdGVtZW50OiAke0pTT04uc3RyaW5naWZ5KHRoaXMubm9kZS5yZXNvbHZlKHByaW5jaXBhbCkpfS4gYCArXG4gICAgICAnU3VwcG9ydGVkOiBBY2NvdW50UHJpbmNpcGFsLCBTZXJ2aWNlUHJpbmNpcGFsJyk7XG4gIH1cbn1cbiJdfQ== |
import { Construct } from '@aws-cdk/cdk'; | ||
import { FunctionRef } from './lambda-ref'; | ||
import { IFunction } from './lambda-ref'; | ||
/** | ||
* Properties for a new Lambda version | ||
*/ | ||
export interface FunctionVersionProps { | ||
export interface VersionProps { | ||
/** | ||
@@ -24,3 +24,3 @@ * SHA256 of the version of the Lambda source code | ||
*/ | ||
lambda: FunctionRef; | ||
lambda: IFunction; | ||
} | ||
@@ -43,3 +43,3 @@ /** | ||
*/ | ||
export declare class FunctionVersion extends Construct { | ||
export declare class Version extends Construct { | ||
/** | ||
@@ -52,4 +52,4 @@ * The most recently deployed version of this function. | ||
*/ | ||
readonly lambda: FunctionRef; | ||
constructor(parent: Construct, name: string, props: FunctionVersionProps); | ||
readonly lambda: IFunction; | ||
constructor(scope: Construct, id: string, props: VersionProps); | ||
} |
@@ -21,5 +21,5 @@ "use strict"; | ||
*/ | ||
class FunctionVersion extends cdk_1.Construct { | ||
constructor(parent, name, props) { | ||
super(parent, name); | ||
class Version extends cdk_1.Construct { | ||
constructor(scope, id, props) { | ||
super(scope, id); | ||
const version = new lambda_generated_1.CfnVersion(this, 'Resource', { | ||
@@ -34,3 +34,3 @@ codeSha256: props.codeSha256, | ||
} | ||
exports.FunctionVersion = FunctionVersion; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJma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ogSUZ1bmN0aW9uO1xuXG4gIGNvbnN0cnVjdG9yKHNjb3BlOiBDb25zdHJ1Y3QsIGlkOiBzdHJpbmcsIHByb3BzOiBWZXJzaW9uUHJvcHMpIHtcbiAgICBzdXBlcihzY29wZSwgaWQpO1xuXG4gICAgY29uc3QgdmVyc2lvbiA9IG5ldyBDZm5WZXJzaW9uKHRoaXMsICdSZXNvdXJjZScsIHtcbiAgICAgIGNvZGVTaGEyNTY6IHByb3BzLmNvZGVTaGEyNTYsXG4gICAgICBkZXNjcmlwdGlvbjogcHJvcHMuZGVzY3JpcHRpb24sXG4gICAgICBmdW5jdGlvbk5hbWU6IHByb3BzLmxhbWJkYS5mdW5jdGlvbk5hbWVcbiAgICB9KTtcblxuICAgIHRoaXMuZnVuY3Rpb25WZXJzaW9uID0gdmVyc2lvbi52ZXJzaW9uO1xuICAgIHRoaXMubGFtYmRhID0gcHJvcHMubGFtYmRhO1xuICB9XG59XG4iXX0= |
@@ -0,1 +1,2 @@ | ||
import cloudwatch = require('@aws-cdk/aws-cloudwatch'); | ||
import ec2 = require('@aws-cdk/aws-ec2'); | ||
@@ -6,4 +7,4 @@ import iam = require('@aws-cdk/aws-iam'); | ||
import { Code } from './code'; | ||
import { FunctionRef } from './lambda-ref'; | ||
import { FunctionVersion } from './lambda-version'; | ||
import { FunctionBase, FunctionImportProps, IFunction } from './lambda-ref'; | ||
import { Version } from './lambda-version'; | ||
import { Runtime } from './runtime'; | ||
@@ -104,3 +105,3 @@ /** | ||
*/ | ||
role?: iam.Role; | ||
role?: iam.IRole; | ||
/** | ||
@@ -111,3 +112,3 @@ * VPC network to place Lambda network interfaces | ||
*/ | ||
vpc?: ec2.VpcNetworkRef; | ||
vpc?: ec2.IVpcNetwork; | ||
/** | ||
@@ -131,3 +132,3 @@ * Where to place the network interfaces within the VPC. | ||
*/ | ||
securityGroup?: ec2.SecurityGroupRef; | ||
securityGroup?: ec2.ISecurityGroup; | ||
/** | ||
@@ -154,3 +155,3 @@ * Whether to allow the Lambda to send all network traffic | ||
*/ | ||
deadLetterQueue?: sqs.QueueRef; | ||
deadLetterQueue?: sqs.IQueue; | ||
/** | ||
@@ -174,4 +175,56 @@ * Enable AWS X-Ray Tracing for Lambda Function. | ||
*/ | ||
export declare class Function extends FunctionRef { | ||
export declare class Function extends FunctionBase { | ||
/** | ||
* Creates a Lambda function object which represents a function not defined | ||
* within this stack. | ||
* | ||
* Lambda.import(this, 'MyImportedFunction', { lambdaArn: new LambdaArn('arn:aws:...') }); | ||
* | ||
* @param parent The parent construct | ||
* @param id The name of the lambda construct | ||
* @param props A reference to a Lambda function. Can be created manually (see | ||
* example above) or obtained through a call to `lambda.export()`. | ||
*/ | ||
static import(scope: cdk.Construct, id: string, props: FunctionImportProps): IFunction; | ||
/** | ||
* Return the given named metric for this Lambda | ||
*/ | ||
static metricAll(metricName: string, props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Metric for the number of Errors executing all Lambdas | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllErrors(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Metric for the Duration executing all Lambdas | ||
* | ||
* @default average over 5 minutes | ||
*/ | ||
static metricAllDuration(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Metric for the number of invocations of all Lambdas | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllInvocations(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Metric for the number of throttled invocations of all Lambdas | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllThrottles(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Metric for the number of concurrent executions across all Lambdas | ||
* | ||
* @default max over 5 minutes | ||
*/ | ||
static metricAllConcurrentExecutions(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Metric for the number of unreserved concurrent executions across all Lambdas | ||
* | ||
* @default max over 5 minutes | ||
*/ | ||
static metricAllUnreservedConcurrentExecutions(props?: cloudwatch.MetricCustomization): cloudwatch.Metric; | ||
/** | ||
* Name of this function | ||
@@ -187,3 +240,3 @@ */ | ||
*/ | ||
readonly role?: iam.Role; | ||
readonly role?: iam.IRole; | ||
/** | ||
@@ -202,4 +255,8 @@ * The runtime configured for this lambda. | ||
private readonly environment?; | ||
constructor(parent: cdk.Construct, name: string, props: FunctionProps); | ||
constructor(scope: cdk.Construct, id: string, props: FunctionProps); | ||
/** | ||
* Export this Function (without the role) | ||
*/ | ||
export(): FunctionImportProps; | ||
/** | ||
* Adds an environment variable to this Lambda function. | ||
@@ -227,3 +284,3 @@ * If this is a ref to a Lambda function, this operation results in a no-op. | ||
*/ | ||
addVersion(name: string, codeSha256?: string, description?: string): FunctionVersion; | ||
addVersion(name: string, codeSha256?: string, description?: string): Version; | ||
private renderEnvironment; | ||
@@ -240,1 +297,10 @@ /** | ||
} | ||
export declare class ImportedFunction extends FunctionBase { | ||
private readonly props; | ||
readonly functionName: string; | ||
readonly functionArn: string; | ||
readonly role?: iam.IRole; | ||
protected readonly canCreatePermissions = false; | ||
constructor(scope: cdk.Construct, id: string, props: FunctionImportProps); | ||
export(): FunctionImportProps; | ||
} |
@@ -10,3 +10,3 @@ import cdk = require('@aws-cdk/cdk'); | ||
*/ | ||
functionName: string | cdk.Token; | ||
functionName: string; | ||
/** | ||
@@ -16,3 +16,3 @@ * ``AWS::Lambda::Alias.FunctionVersion`` | ||
*/ | ||
functionVersion: string | cdk.Token; | ||
functionVersion: string; | ||
/** | ||
@@ -22,3 +22,3 @@ * ``AWS::Lambda::Alias.Name`` | ||
*/ | ||
name: string | cdk.Token; | ||
name: string; | ||
/** | ||
@@ -28,3 +28,3 @@ * ``AWS::Lambda::Alias.Description`` | ||
*/ | ||
description?: string | cdk.Token; | ||
description?: string; | ||
/** | ||
@@ -48,7 +48,7 @@ * ``AWS::Lambda::Alias.RoutingConfig`` | ||
* | ||
* @param parent the ``cdk.Construct`` this ``CfnAlias`` is a part of | ||
* @param name the name of the resource in the ``cdk.Construct`` tree | ||
* @param properties the properties of this ``CfnAlias`` | ||
* @param scope scope in which this resource is defined | ||
* @param id scoped id of the resource | ||
* @param props resource properties | ||
*/ | ||
constructor(parent: cdk.Construct, name: string, properties: CfnAliasProps); | ||
constructor(scope: cdk.Construct, id: string, props: CfnAliasProps); | ||
readonly propertyOverrides: CfnAliasProps; | ||
@@ -80,3 +80,3 @@ protected renderProperties(properties: any): { | ||
*/ | ||
functionVersion: string | cdk.Token; | ||
functionVersion: string; | ||
/** | ||
@@ -89,86 +89,2 @@ * ``CfnAlias.VersionWeightProperty.FunctionWeight`` | ||
} | ||
export declare namespace cloudformation { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html | ||
*/ | ||
interface AliasResourceProps { | ||
/** | ||
* ``AWS::Lambda::Alias.FunctionName`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-functionname | ||
*/ | ||
functionName: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Alias.FunctionVersion`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-functionversion | ||
*/ | ||
functionVersion: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Alias.Name`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-name | ||
*/ | ||
name: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Alias.Description`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-description | ||
*/ | ||
description?: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Alias.RoutingConfig`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-routingconfig | ||
*/ | ||
routingConfig?: AliasResource.AliasRoutingConfigurationProperty | cdk.Token; | ||
} | ||
/** | ||
* @deprecated "cloudformation.AliasResource" will be deprecated in a future release in favor of "CfnAlias" (see https://github.com/awslabs/aws-cdk/issues/878) | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html | ||
*/ | ||
class AliasResource extends cdk.Resource { | ||
/** | ||
* The CloudFormation resource type name for this resource class. | ||
*/ | ||
static readonly resourceTypeName = "AWS::Lambda::Alias"; | ||
readonly aliasArn: string; | ||
/** | ||
* Creates a new ``AWS::Lambda::Alias``. | ||
* | ||
* @param parent the ``cdk.Construct`` this ``AliasResource`` is a part of | ||
* @param name the name of the resource in the ``cdk.Construct`` tree | ||
* @param properties the properties of this ``AliasResource`` | ||
*/ | ||
constructor(parent: cdk.Construct, name: string, properties: AliasResourceProps); | ||
readonly propertyOverrides: AliasResourceProps; | ||
protected renderProperties(properties: any): { | ||
[key: string]: any; | ||
}; | ||
} | ||
namespace AliasResource { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-aliasroutingconfiguration.html | ||
*/ | ||
interface AliasRoutingConfigurationProperty { | ||
/** | ||
* ``AliasResource.AliasRoutingConfigurationProperty.AdditionalVersionWeights`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-aliasroutingconfiguration.html#cfn-lambda-alias-aliasroutingconfiguration-additionalversionweights | ||
*/ | ||
additionalVersionWeights: Array<AliasResource.VersionWeightProperty | cdk.Token> | cdk.Token; | ||
} | ||
} | ||
namespace AliasResource { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-versionweight.html | ||
*/ | ||
interface VersionWeightProperty { | ||
/** | ||
* ``AliasResource.VersionWeightProperty.FunctionVersion`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-versionweight.html#cfn-lambda-alias-versionweight-functionversion | ||
*/ | ||
functionVersion: string | cdk.Token; | ||
/** | ||
* ``AliasResource.VersionWeightProperty.FunctionWeight`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-alias-versionweight.html#cfn-lambda-alias-versionweight-functionweight | ||
*/ | ||
functionWeight: number | cdk.Token; | ||
} | ||
} | ||
} | ||
/** | ||
@@ -182,3 +98,3 @@ * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html | ||
*/ | ||
eventSourceArn: string | cdk.Token; | ||
eventSourceArn: string; | ||
/** | ||
@@ -188,3 +104,3 @@ * ``AWS::Lambda::EventSourceMapping.FunctionName`` | ||
*/ | ||
functionName: string | cdk.Token; | ||
functionName: string; | ||
/** | ||
@@ -204,3 +120,3 @@ * ``AWS::Lambda::EventSourceMapping.BatchSize`` | ||
*/ | ||
startingPosition?: string | cdk.Token; | ||
startingPosition?: string; | ||
} | ||
@@ -219,7 +135,7 @@ /** | ||
* | ||
* @param parent the ``cdk.Construct`` this ``CfnEventSourceMapping`` is a part of | ||
* @param name the name of the resource in the ``cdk.Construct`` tree | ||
* @param properties the properties of this ``CfnEventSourceMapping`` | ||
* @param scope scope in which this resource is defined | ||
* @param id scoped id of the resource | ||
* @param props resource properties | ||
*/ | ||
constructor(parent: cdk.Construct, name: string, properties: CfnEventSourceMappingProps); | ||
constructor(scope: cdk.Construct, id: string, props: CfnEventSourceMappingProps); | ||
readonly propertyOverrides: CfnEventSourceMappingProps; | ||
@@ -230,57 +146,2 @@ protected renderProperties(properties: any): { | ||
} | ||
export declare namespace cloudformation { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html | ||
*/ | ||
interface EventSourceMappingResourceProps { | ||
/** | ||
* ``AWS::Lambda::EventSourceMapping.EventSourceArn`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-eventsourcearn | ||
*/ | ||
eventSourceArn: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::EventSourceMapping.FunctionName`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-functionname | ||
*/ | ||
functionName: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::EventSourceMapping.BatchSize`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-batchsize | ||
*/ | ||
batchSize?: number | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::EventSourceMapping.Enabled`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-enabled | ||
*/ | ||
enabled?: boolean | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::EventSourceMapping.StartingPosition`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html#cfn-lambda-eventsourcemapping-startingposition | ||
*/ | ||
startingPosition?: string | cdk.Token; | ||
} | ||
/** | ||
* @deprecated "cloudformation.EventSourceMappingResource" will be deprecated in a future release in favor of "CfnEventSourceMapping" (see https://github.com/awslabs/aws-cdk/issues/878) | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html | ||
*/ | ||
class EventSourceMappingResource extends cdk.Resource { | ||
/** | ||
* The CloudFormation resource type name for this resource class. | ||
*/ | ||
static readonly resourceTypeName = "AWS::Lambda::EventSourceMapping"; | ||
readonly eventSourceMappingName: string; | ||
/** | ||
* Creates a new ``AWS::Lambda::EventSourceMapping``. | ||
* | ||
* @param parent the ``cdk.Construct`` this ``EventSourceMappingResource`` is a part of | ||
* @param name the name of the resource in the ``cdk.Construct`` tree | ||
* @param properties the properties of this ``EventSourceMappingResource`` | ||
*/ | ||
constructor(parent: cdk.Construct, name: string, properties: EventSourceMappingResourceProps); | ||
readonly propertyOverrides: EventSourceMappingResourceProps; | ||
protected renderProperties(properties: any): { | ||
[key: string]: any; | ||
}; | ||
} | ||
} | ||
/** | ||
@@ -299,3 +160,3 @@ * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html | ||
*/ | ||
handler: string | cdk.Token; | ||
handler: string; | ||
/** | ||
@@ -305,3 +166,3 @@ * ``AWS::Lambda::Function.Role`` | ||
*/ | ||
role: string | cdk.Token; | ||
role: string; | ||
/** | ||
@@ -311,3 +172,3 @@ * ``AWS::Lambda::Function.Runtime`` | ||
*/ | ||
runtime: string | cdk.Token; | ||
runtime: string; | ||
/** | ||
@@ -322,3 +183,3 @@ * ``AWS::Lambda::Function.DeadLetterConfig`` | ||
*/ | ||
description?: string | cdk.Token; | ||
description?: string; | ||
/** | ||
@@ -333,3 +194,3 @@ * ``AWS::Lambda::Function.Environment`` | ||
*/ | ||
functionName?: string | cdk.Token; | ||
functionName?: string; | ||
/** | ||
@@ -339,3 +200,3 @@ * ``AWS::Lambda::Function.KmsKeyArn`` | ||
*/ | ||
kmsKeyArn?: string | cdk.Token; | ||
kmsKeyArn?: string; | ||
/** | ||
@@ -393,7 +254,7 @@ * ``AWS::Lambda::Function.Layers`` | ||
* | ||
* @param parent the ``cdk.Construct`` this ``CfnFunction`` is a part of | ||
* @param name the name of the resource in the ``cdk.Construct`` tree | ||
* @param properties the properties of this ``CfnFunction`` | ||
* @param scope scope in which this resource is defined | ||
* @param id scoped id of the resource | ||
* @param props resource properties | ||
*/ | ||
constructor(parent: cdk.Construct, name: string, properties: CfnFunctionProps); | ||
constructor(scope: cdk.Construct, id: string, props: CfnFunctionProps); | ||
readonly propertyOverrides: CfnFunctionProps; | ||
@@ -413,3 +274,3 @@ protected renderProperties(properties: any): { | ||
*/ | ||
s3Bucket?: string | cdk.Token; | ||
s3Bucket?: string; | ||
/** | ||
@@ -419,3 +280,3 @@ * ``CfnFunction.CodeProperty.S3Key`` | ||
*/ | ||
s3Key?: string | cdk.Token; | ||
s3Key?: string; | ||
/** | ||
@@ -425,3 +286,3 @@ * ``CfnFunction.CodeProperty.S3ObjectVersion`` | ||
*/ | ||
s3ObjectVersion?: string | cdk.Token; | ||
s3ObjectVersion?: string; | ||
/** | ||
@@ -431,3 +292,3 @@ * ``CfnFunction.CodeProperty.ZipFile`` | ||
*/ | ||
zipFile?: string | cdk.Token; | ||
zipFile?: string; | ||
} | ||
@@ -444,3 +305,3 @@ } | ||
*/ | ||
targetArn?: string | cdk.Token; | ||
targetArn?: string; | ||
} | ||
@@ -471,3 +332,3 @@ } | ||
*/ | ||
mode?: string | cdk.Token; | ||
mode?: string; | ||
} | ||
@@ -492,198 +353,2 @@ } | ||
} | ||
export declare namespace cloudformation { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html | ||
*/ | ||
interface FunctionResourceProps { | ||
/** | ||
* ``AWS::Lambda::Function.Code`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-code | ||
*/ | ||
code: FunctionResource.CodeProperty | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.Handler`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-handler | ||
*/ | ||
handler: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.Role`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-role | ||
*/ | ||
role: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.Runtime`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-runtime | ||
*/ | ||
runtime: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.DeadLetterConfig`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-deadletterconfig | ||
*/ | ||
deadLetterConfig?: FunctionResource.DeadLetterConfigProperty | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.Description`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-description | ||
*/ | ||
description?: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.Environment`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-environment | ||
*/ | ||
environment?: FunctionResource.EnvironmentProperty | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.FunctionName`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-functionname | ||
*/ | ||
functionName?: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.KmsKeyArn`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-kmskeyarn | ||
*/ | ||
kmsKeyArn?: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.Layers`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-layers | ||
*/ | ||
layers?: Array<string | cdk.Token> | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.MemorySize`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-memorysize | ||
*/ | ||
memorySize?: number | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.ReservedConcurrentExecutions`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-reservedconcurrentexecutions | ||
*/ | ||
reservedConcurrentExecutions?: number | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.Tags`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tags | ||
*/ | ||
tags?: Array<cdk.Tag | cdk.Token> | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.Timeout`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-timeout | ||
*/ | ||
timeout?: number | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.TracingConfig`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-tracingconfig | ||
*/ | ||
tracingConfig?: FunctionResource.TracingConfigProperty | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Function.VpcConfig`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-vpcconfig | ||
*/ | ||
vpcConfig?: FunctionResource.VpcConfigProperty | cdk.Token; | ||
} | ||
/** | ||
* @deprecated "cloudformation.FunctionResource" will be deprecated in a future release in favor of "CfnFunction" (see https://github.com/awslabs/aws-cdk/issues/878) | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html | ||
*/ | ||
class FunctionResource extends cdk.Resource { | ||
/** | ||
* The CloudFormation resource type name for this resource class. | ||
*/ | ||
static readonly resourceTypeName = "AWS::Lambda::Function"; | ||
/** | ||
* @cloudformation_attribute Arn | ||
*/ | ||
readonly functionArn: string; | ||
readonly functionName: string; | ||
/** | ||
* Creates a new ``AWS::Lambda::Function``. | ||
* | ||
* @param parent the ``cdk.Construct`` this ``FunctionResource`` is a part of | ||
* @param name the name of the resource in the ``cdk.Construct`` tree | ||
* @param properties the properties of this ``FunctionResource`` | ||
*/ | ||
constructor(parent: cdk.Construct, name: string, properties: FunctionResourceProps); | ||
readonly propertyOverrides: FunctionResourceProps; | ||
protected renderProperties(properties: any): { | ||
[key: string]: any; | ||
}; | ||
} | ||
namespace FunctionResource { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html | ||
*/ | ||
interface CodeProperty { | ||
/** | ||
* ``FunctionResource.CodeProperty.S3Bucket`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-s3bucket | ||
*/ | ||
s3Bucket?: string | cdk.Token; | ||
/** | ||
* ``FunctionResource.CodeProperty.S3Key`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-s3key | ||
*/ | ||
s3Key?: string | cdk.Token; | ||
/** | ||
* ``FunctionResource.CodeProperty.S3ObjectVersion`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-s3objectversion | ||
*/ | ||
s3ObjectVersion?: string | cdk.Token; | ||
/** | ||
* ``FunctionResource.CodeProperty.ZipFile`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-zipfile | ||
*/ | ||
zipFile?: string | cdk.Token; | ||
} | ||
} | ||
namespace FunctionResource { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-deadletterconfig.html | ||
*/ | ||
interface DeadLetterConfigProperty { | ||
/** | ||
* ``FunctionResource.DeadLetterConfigProperty.TargetArn`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-deadletterconfig.html#cfn-lambda-function-deadletterconfig-targetarn | ||
*/ | ||
targetArn?: string | cdk.Token; | ||
} | ||
} | ||
namespace FunctionResource { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-environment.html | ||
*/ | ||
interface EnvironmentProperty { | ||
/** | ||
* ``FunctionResource.EnvironmentProperty.Variables`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-environment.html#cfn-lambda-function-environment-variables | ||
*/ | ||
variables?: { | ||
[key: string]: (string | cdk.Token); | ||
} | cdk.Token; | ||
} | ||
} | ||
namespace FunctionResource { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-tracingconfig.html | ||
*/ | ||
interface TracingConfigProperty { | ||
/** | ||
* ``FunctionResource.TracingConfigProperty.Mode`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-tracingconfig.html#cfn-lambda-function-tracingconfig-mode | ||
*/ | ||
mode?: string | cdk.Token; | ||
} | ||
} | ||
namespace FunctionResource { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-vpcconfig.html | ||
*/ | ||
interface VpcConfigProperty { | ||
/** | ||
* ``FunctionResource.VpcConfigProperty.SecurityGroupIds`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-vpcconfig.html#cfn-lambda-function-vpcconfig-securitygroupids | ||
*/ | ||
securityGroupIds: Array<string | cdk.Token> | cdk.Token; | ||
/** | ||
* ``FunctionResource.VpcConfigProperty.SubnetIds`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-vpcconfig.html#cfn-lambda-function-vpcconfig-subnetids | ||
*/ | ||
subnetIds: Array<string | cdk.Token> | cdk.Token; | ||
} | ||
} | ||
} | ||
/** | ||
@@ -697,3 +362,3 @@ * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html | ||
*/ | ||
action: string | cdk.Token; | ||
action: string; | ||
/** | ||
@@ -703,3 +368,3 @@ * ``AWS::Lambda::Permission.FunctionName`` | ||
*/ | ||
functionName: string | cdk.Token; | ||
functionName: string; | ||
/** | ||
@@ -709,3 +374,3 @@ * ``AWS::Lambda::Permission.Principal`` | ||
*/ | ||
principal: string | cdk.Token; | ||
principal: string; | ||
/** | ||
@@ -715,3 +380,3 @@ * ``AWS::Lambda::Permission.EventSourceToken`` | ||
*/ | ||
eventSourceToken?: string | cdk.Token; | ||
eventSourceToken?: string; | ||
/** | ||
@@ -721,3 +386,3 @@ * ``AWS::Lambda::Permission.SourceAccount`` | ||
*/ | ||
sourceAccount?: string | cdk.Token; | ||
sourceAccount?: string; | ||
/** | ||
@@ -727,3 +392,3 @@ * ``AWS::Lambda::Permission.SourceArn`` | ||
*/ | ||
sourceArn?: string | cdk.Token; | ||
sourceArn?: string; | ||
} | ||
@@ -741,7 +406,7 @@ /** | ||
* | ||
* @param parent the ``cdk.Construct`` this ``CfnPermission`` is a part of | ||
* @param name the name of the resource in the ``cdk.Construct`` tree | ||
* @param properties the properties of this ``CfnPermission`` | ||
* @param scope scope in which this resource is defined | ||
* @param id scoped id of the resource | ||
* @param props resource properties | ||
*/ | ||
constructor(parent: cdk.Construct, name: string, properties: CfnPermissionProps); | ||
constructor(scope: cdk.Construct, id: string, props: CfnPermissionProps); | ||
readonly propertyOverrides: CfnPermissionProps; | ||
@@ -752,61 +417,2 @@ protected renderProperties(properties: any): { | ||
} | ||
export declare namespace cloudformation { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html | ||
*/ | ||
interface PermissionResourceProps { | ||
/** | ||
* ``AWS::Lambda::Permission.Action`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html#cfn-lambda-permission-action | ||
*/ | ||
action: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Permission.FunctionName`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html#cfn-lambda-permission-functionname | ||
*/ | ||
functionName: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Permission.Principal`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html#cfn-lambda-permission-principal | ||
*/ | ||
principal: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Permission.EventSourceToken`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html#cfn-lambda-permission-eventsourcetoken | ||
*/ | ||
eventSourceToken?: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Permission.SourceAccount`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html#cfn-lambda-permission-sourceaccount | ||
*/ | ||
sourceAccount?: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Permission.SourceArn`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html#cfn-lambda-permission-sourcearn | ||
*/ | ||
sourceArn?: string | cdk.Token; | ||
} | ||
/** | ||
* @deprecated "cloudformation.PermissionResource" will be deprecated in a future release in favor of "CfnPermission" (see https://github.com/awslabs/aws-cdk/issues/878) | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html | ||
*/ | ||
class PermissionResource extends cdk.Resource { | ||
/** | ||
* The CloudFormation resource type name for this resource class. | ||
*/ | ||
static readonly resourceTypeName = "AWS::Lambda::Permission"; | ||
/** | ||
* Creates a new ``AWS::Lambda::Permission``. | ||
* | ||
* @param parent the ``cdk.Construct`` this ``PermissionResource`` is a part of | ||
* @param name the name of the resource in the ``cdk.Construct`` tree | ||
* @param properties the properties of this ``PermissionResource`` | ||
*/ | ||
constructor(parent: cdk.Construct, name: string, properties: PermissionResourceProps); | ||
readonly propertyOverrides: PermissionResourceProps; | ||
protected renderProperties(properties: any): { | ||
[key: string]: any; | ||
}; | ||
} | ||
} | ||
/** | ||
@@ -820,3 +426,3 @@ * @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.html | ||
*/ | ||
functionName: string | cdk.Token; | ||
functionName: string; | ||
/** | ||
@@ -826,3 +432,3 @@ * ``AWS::Lambda::Version.CodeSha256`` | ||
*/ | ||
codeSha256?: string | cdk.Token; | ||
codeSha256?: string; | ||
/** | ||
@@ -832,3 +438,3 @@ * ``AWS::Lambda::Version.Description`` | ||
*/ | ||
description?: string | cdk.Token; | ||
description?: string; | ||
} | ||
@@ -851,7 +457,7 @@ /** | ||
* | ||
* @param parent the ``cdk.Construct`` this ``CfnVersion`` is a part of | ||
* @param name the name of the resource in the ``cdk.Construct`` tree | ||
* @param properties the properties of this ``CfnVersion`` | ||
* @param scope scope in which this resource is defined | ||
* @param id scoped id of the resource | ||
* @param props resource properties | ||
*/ | ||
constructor(parent: cdk.Construct, name: string, properties: CfnVersionProps); | ||
constructor(scope: cdk.Construct, id: string, props: CfnVersionProps); | ||
readonly propertyOverrides: CfnVersionProps; | ||
@@ -862,50 +468,1 @@ protected renderProperties(properties: any): { | ||
} | ||
export declare namespace cloudformation { | ||
/** | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.html | ||
*/ | ||
interface VersionResourceProps { | ||
/** | ||
* ``AWS::Lambda::Version.FunctionName`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.html#cfn-lambda-version-functionname | ||
*/ | ||
functionName: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Version.CodeSha256`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.html#cfn-lambda-version-codesha256 | ||
*/ | ||
codeSha256?: string | cdk.Token; | ||
/** | ||
* ``AWS::Lambda::Version.Description`` | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.html#cfn-lambda-version-description | ||
*/ | ||
description?: string | cdk.Token; | ||
} | ||
/** | ||
* @deprecated "cloudformation.VersionResource" will be deprecated in a future release in favor of "CfnVersion" (see https://github.com/awslabs/aws-cdk/issues/878) | ||
* @link http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-version.html | ||
*/ | ||
class VersionResource extends cdk.Resource { | ||
/** | ||
* The CloudFormation resource type name for this resource class. | ||
*/ | ||
static readonly resourceTypeName = "AWS::Lambda::Version"; | ||
/** | ||
* @cloudformation_attribute Version | ||
*/ | ||
readonly version: string; | ||
readonly versionArn: string; | ||
/** | ||
* Creates a new ``AWS::Lambda::Version``. | ||
* | ||
* @param parent the ``cdk.Construct`` this ``VersionResource`` is a part of | ||
* @param name the name of the resource in the ``cdk.Construct`` tree | ||
* @param properties the properties of this ``VersionResource`` | ||
*/ | ||
constructor(parent: cdk.Construct, name: string, properties: VersionResourceProps); | ||
readonly propertyOverrides: VersionResourceProps; | ||
protected renderProperties(properties: any): { | ||
[key: string]: any; | ||
}; | ||
} | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const cloudwatch = require("@aws-cdk/aws-cloudwatch"); | ||
const ec2 = require("@aws-cdk/aws-ec2"); | ||
@@ -41,5 +42,5 @@ const iam = require("@aws-cdk/aws-iam"); | ||
*/ | ||
class Function extends lambda_ref_1.FunctionRef { | ||
constructor(parent, name, props) { | ||
super(parent, name); | ||
class Function extends lambda_ref_1.FunctionBase { | ||
constructor(scope, id, props) { | ||
super(scope, id); | ||
this.canCreatePermissions = true; | ||
@@ -49,6 +50,6 @@ this.environment = props.environment || {}; | ||
// the arn is in the form of - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole | ||
managedPolicyArns.push(new iam.AwsManagedPolicy("service-role/AWSLambdaBasicExecutionRole").policyArn); | ||
managedPolicyArns.push(new iam.AwsManagedPolicy("service-role/AWSLambdaBasicExecutionRole", this).policyArn); | ||
if (props.vpc) { | ||
// Policy that will have ENI creation permissions | ||
managedPolicyArns.push(new iam.AwsManagedPolicy("service-role/AWSLambdaVPCAccessExecutionRole").policyArn); | ||
managedPolicyArns.push(new iam.AwsManagedPolicy("service-role/AWSLambdaVPCAccessExecutionRole", this).policyArn); | ||
} | ||
@@ -65,3 +66,3 @@ this.role = props.role || new iam.Role(this, 'ServiceRole', { | ||
description: props.description, | ||
code: new cdk.Token(() => props.code.toJSON()), | ||
code: new cdk.Token(() => props.code.toJSON(resource)), | ||
handler: props.handler, | ||
@@ -86,2 +87,87 @@ timeout: props.timeout, | ||
/** | ||
* Creates a Lambda function object which represents a function not defined | ||
* within this stack. | ||
* | ||
* Lambda.import(this, 'MyImportedFunction', { lambdaArn: new LambdaArn('arn:aws:...') }); | ||
* | ||
* @param parent The parent construct | ||
* @param id The name of the lambda construct | ||
* @param props A reference to a Lambda function. Can be created manually (see | ||
* example above) or obtained through a call to `lambda.export()`. | ||
*/ | ||
static import(scope, id, props) { | ||
return new ImportedFunction(scope, id, props); | ||
} | ||
/** | ||
* Return the given named metric for this Lambda | ||
*/ | ||
static metricAll(metricName, props) { | ||
return new cloudwatch.Metric(Object.assign({ namespace: 'AWS/Lambda', metricName }, props)); | ||
} | ||
/** | ||
* Metric for the number of Errors executing all Lambdas | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllErrors(props) { | ||
return this.metricAll('Errors', Object.assign({ statistic: 'sum' }, props)); | ||
} | ||
/** | ||
* Metric for the Duration executing all Lambdas | ||
* | ||
* @default average over 5 minutes | ||
*/ | ||
static metricAllDuration(props) { | ||
return this.metricAll('Duration', props); | ||
} | ||
/** | ||
* Metric for the number of invocations of all Lambdas | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllInvocations(props) { | ||
return this.metricAll('Invocations', Object.assign({ statistic: 'sum' }, props)); | ||
} | ||
/** | ||
* Metric for the number of throttled invocations of all Lambdas | ||
* | ||
* @default sum over 5 minutes | ||
*/ | ||
static metricAllThrottles(props) { | ||
return this.metricAll('Throttles', Object.assign({ statistic: 'sum' }, props)); | ||
} | ||
/** | ||
* Metric for the number of concurrent executions across all Lambdas | ||
* | ||
* @default max over 5 minutes | ||
*/ | ||
static metricAllConcurrentExecutions(props) { | ||
// Mini-FAQ: why max? This metric is a gauge that is emitted every | ||
// minute, so either max or avg or a percentile make sense (but sum | ||
// doesn't). Max is more sensitive to spiky load changes which is | ||
// probably what you're interested in if you're looking at this metric | ||
// (Load spikes may lead to concurrent execution errors that would | ||
// otherwise not be visible in the avg) | ||
return this.metricAll('ConcurrentExecutions', Object.assign({ statistic: 'max' }, props)); | ||
} | ||
/** | ||
* Metric for the number of unreserved concurrent executions across all Lambdas | ||
* | ||
* @default max over 5 minutes | ||
*/ | ||
static metricAllUnreservedConcurrentExecutions(props) { | ||
return this.metricAll('UnreservedConcurrentExecutions', Object.assign({ statistic: 'max' }, props)); | ||
} | ||
/** | ||
* Export this Function (without the role) | ||
*/ | ||
export() { | ||
return { | ||
functionArn: new cdk.Output(this, 'FunctionArn', { value: this.functionArn }).makeImportValue().toString(), | ||
securityGroupId: this._connections && this._connections.securityGroups[0] | ||
? new cdk.Output(this, 'SecurityGroupId', { value: this._connections.securityGroups[0].securityGroupId }).makeImportValue().toString() | ||
: undefined | ||
}; | ||
} | ||
/** | ||
* Adds an environment variable to this Lambda function. | ||
@@ -116,3 +202,3 @@ * If this is a ref to a Lambda function, this operation results in a no-op. | ||
addVersion(name, codeSha256, description) { | ||
return new lambda_version_1.FunctionVersion(this, 'Version' + name, { | ||
return new lambda_version_1.Version(this, 'Version' + name, { | ||
lambda: this, | ||
@@ -149,3 +235,3 @@ codeSha256, | ||
vpc: props.vpc, | ||
description: 'Automatic security group for Lambda Function ' + this.uniqueId, | ||
description: 'Automatic security group for Lambda Function ' + this.node.uniqueId, | ||
allowAllOutbound: props.allowAllOutbound | ||
@@ -197,2 +283,39 @@ }); | ||
exports.Function = Function; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGFtYmRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsibGFtYmRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsd0NBQXlDO0FBQ3pDLHdDQUF5QztBQUN6Qyx3Q0FBeUM7QUFDekMsb0NBQXFDO0FBRXJDLDZDQUEyQztBQUMzQyxxREFBbUQ7QUFDbkQseURBQWlEO0FBR2pEOztHQUVHO0FBQ0gsSUFBWSxPQWVYO0FBZkQsV0FBWSxPQUFPO0lBQ2pCOzs7T0FHRztJQUNILHlDQUFNLENBQUE7SUFDTjs7O09BR0c7SUFDSCxtREFBVyxDQUFBO0lBQ1g7O09BRUc7SUFDSCw2Q0FBUSxDQUFBO0FBQ1YsQ0FBQyxFQWZXLE9BQU8sR0FBUCxlQUFPLEtBQVAsZUFBTyxRQWVsQjtBQW1KRDs7Ozs7Ozs7OztHQVVHO0FBQ0gsTUFBYSxRQUFTLFNBQVEsd0JBQVc7SUFpQ3ZDLFlBQVksTUFBcUIsRUFBRSxJQUFZLEVBQUUsS0FBb0I7UUFDbkUsS0FBSyxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsQ0FBQztRQVJILHlCQUFvQixHQUFHLElBQUksQ0FBQztRQVU3QyxJQUFJLENBQUMsV0FBVyxHQUFHLEtBQUssQ0FBQyxXQUFXLElBQUksRUFBRyxDQUFDO1FBRTVDLE1BQU0saUJBQWlCLEdBQUcsSUFBSSxLQUFLLEVBQVUsQ0FBQztRQUU5QywrRkFBK0Y7UUFDL0YsaUJBQWlCLENBQUMsSUFBSSxDQUFDLElBQUksR0FBRyxDQUFDLGdCQUFnQixDQUFDLDBDQUEwQyxDQU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HJhY2luZ0NvbmZpZyhwcm9wczogRnVuY3Rpb25Qcm9wcykge1xuICAgIGlmIChwcm9wcy50cmFjaW5nID09PSB1bmRlZmluZWQgfHwgcHJvcHMudHJhY2luZyA9PT0gVHJhY2luZy5EaXNhYmxlZCkge1xuICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICB0aGlzLmFkZFRvUm9sZVBvbGljeShuZXcgaWFtLlBvbGljeVN0YXRlbWVudCgpXG4gICAgICAuYWRkQWN0aW9ucygneHJheTpQdXRUcmFjZVNlZ21lbnRzJywgJ3hyYXk6UHV0VGVsZW1ldHJ5UmVjb3JkcycpXG4gICAgICAuYWRkQWxsUmVzb3VyY2VzKCkpO1xuXG4gICAgcmV0dXJuIHtcbiAgICAgIG1vZGU6IFRyYWNpbmdbcHJvcHMudHJhY2luZ11cbiAgICB9O1xuICB9XG5cbn1cbiJdfQ== | ||
class ImportedFunction extends lambda_ref_1.FunctionBase { | ||
constructor(scope, id, props) { | ||
super(scope, id); | ||
this.props = props; | ||
this.canCreatePermissions = false; | ||
this.functionArn = props.functionArn; | ||
this.functionName = extractNameFromArn(props.functionArn); | ||
this.role = props.role; | ||
if (props.securityGroupId) { | ||
this._connections = new ec2.Connections({ | ||
securityGroups: [ | ||
ec2.SecurityGroup.import(this, 'SecurityGroup', { securityGroupId: props.securityGroupId }) | ||
] | ||
}); | ||
} | ||
} | ||
export() { | ||
return this.props; | ||
} | ||
} | ||
exports.ImportedFunction = ImportedFunction; | ||
/** | ||
* Given an opaque (token) ARN, returns a CloudFormation expression that extracts the function | ||
* name from the ARN. | ||
* | ||
* Function ARNs look like this: | ||
* | ||
* arn:aws:lambda:region:account-id:function:function-name | ||
* | ||
* ..which means that in order to extract the `function-name` component from the ARN, we can | ||
* split the ARN using ":" and select the component in index 6. | ||
* | ||
* @returns `FnSelect(6, FnSplit(':', arn))` | ||
*/ | ||
function extractNameFromArn(arn) { | ||
return cdk.Fn.select(6, cdk.Fn.split(':',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XG4gICAgICAgIF1cbiAgICAgIH0pO1xuICAgIH1cbiAgfVxuXG4gIHB1YmxpYyBleHBvcnQoKSB7XG4gICAgcmV0dXJuIHRoaXMucHJvcHM7XG4gIH1cbn1cblxuLyoqXG4gKiBHaXZlbiBhbiBvcGFxdWUgKHRva2VuKSBBUk4sIHJldHVybnMgYSBDbG91ZEZvcm1hdGlvbiBleHByZXNzaW9uIHRoYXQgZXh0cmFjdHMgdGhlIGZ1bmN0aW9uXG4gKiBuYW1lIGZyb20gdGhlIEFSTi5cbiAqXG4gKiBGdW5jdGlvbiBBUk5zIGxvb2sgbGlrZSB0aGlzOlxuICpcbiAqICAgYXJuOmF3czpsYW1iZGE6cmVnaW9uOmFjY291bnQtaWQ6ZnVuY3Rpb246ZnVuY3Rpb24tbmFtZVxuICpcbiAqIC4ud2hpY2ggbWVhbnMgdGhhdCBpbiBvcmRlciB0byBleHRyYWN0IHRoZSBgZnVuY3Rpb24tbmFtZWAgY29tcG9uZW50IGZyb20gdGhlIEFSTiwgd2UgY2FuXG4gKiBzcGxpdCB0aGUgQVJOIHVzaW5nIFwiOlwiIGFuZCBzZWxlY3QgdGhlIGNvbXBvbmVudCBpbiBpbmRleCA2LlxuICpcbiAqIEByZXR1cm5zIGBGblNlbGVjdCg2LCBGblNwbGl0KCc6JywgYXJuKSlgXG4gKi9cbmZ1bmN0aW9uIGV4dHJhY3ROYW1lRnJvbUFybihhcm46IHN0cmluZykge1xuICByZXR1cm4gY2RrLkZuLnNlbGVjdCg2LCBjZGsuRm4uc3BsaXQoJzonLCBhcm4pKTtcbn0iXX0= |
import codepipeline = require('@aws-cdk/aws-codepipeline-api'); | ||
import cdk = require('@aws-cdk/cdk'); | ||
import { FunctionRef } from './lambda-ref'; | ||
import { IFunction } from './lambda-ref'; | ||
/** | ||
* Common properties for creating a {@link PipelineInvokeAction} - | ||
* either directly, through its constructor, | ||
* or through {@link FunctionRef#addToPipeline}. | ||
* or through {@link IFunction#addToPipeline}. | ||
*/ | ||
export interface CommonPipelineInvokeActionProps extends codepipeline.CommonActionProps { | ||
/** | ||
* The optional input Artifacts of the Action. | ||
* A Lambda Action can have up to 5 inputs. | ||
* The inputs will appear in the event passed to the Lambda, | ||
* under the `'CodePipeline.job'.data.inputArtifacts` path. | ||
* | ||
* @default the Action will not have any inputs | ||
* @see https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html#actions-invoke-lambda-function-json-event-example | ||
*/ | ||
inputArtifacts?: codepipeline.Artifact[]; | ||
/** | ||
* The optional names of the output Artifacts of the Action. | ||
* A Lambda Action can have up to 5 outputs. | ||
* The outputs will appear in the event passed to the Lambda, | ||
* under the `'CodePipeline.job'.data.outputArtifacts` path. | ||
* It is the responsibility of the Lambda to upload ZIP files with the Artifact contents to the provided locations. | ||
* | ||
* @default the Action will not have any outputs | ||
*/ | ||
outputArtifactNames?: string[]; | ||
/** | ||
* String to be used in the event data parameter passed to the Lambda | ||
@@ -43,3 +63,3 @@ * function | ||
*/ | ||
lambda: FunctionRef; | ||
lambda: IFunction; | ||
} | ||
@@ -52,3 +72,5 @@ /** | ||
export declare class PipelineInvokeAction extends codepipeline.Action { | ||
constructor(parent: cdk.Construct, name: string, props: PipelineInvokeActionProps); | ||
constructor(scope: cdk.Construct, id: string, props: PipelineInvokeActionProps); | ||
outputArtifacts(): codepipeline.Artifact[]; | ||
outputArtifact(artifactName: string): codepipeline.Artifact; | ||
} |
@@ -11,4 +11,4 @@ "use strict"; | ||
class PipelineInvokeAction extends codepipeline.Action { | ||
constructor(parent, name, props) { | ||
super(parent, name, { | ||
constructor(scope, id, props) { | ||
super(scope, id, { | ||
stage: props.stage, | ||
@@ -24,2 +24,10 @@ runOrder: props.runOrder, | ||
}); | ||
// handle input artifacts | ||
for (const inputArtifact of props.inputArtifacts || []) { | ||
this.addInputArtifact(inputArtifact); | ||
} | ||
// handle output artifacts | ||
for (const outputArtifactName of props.outputArtifactNames || []) { | ||
this.addOutputArtifact(outputArtifactName); | ||
} | ||
// allow pipeline to list functions | ||
@@ -42,4 +50,16 @@ props.stage.pipeline.role.addToPolicy(new iam.PolicyStatement() | ||
} | ||
outputArtifacts() { | ||
return this._outputArtifacts; | ||
} | ||
outputArtifact(artifactName) { | ||
const result = this._outputArtifacts.find(a => (a.name === artifactName)); | ||
if (result === undefined) { | ||
throw new Error(`Could not find the output Artifact with name '${artifactName}'`); | ||
} | ||
else { | ||
return result; | ||
} | ||
} | ||
} | ||
exports.PipelineInvokeAction = PipelineInvokeAction; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGlwZWxpbmUtYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsicGlwZWxpbmUtYWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsOERBQStEO0FBQy9ELHdDQUF5QztBQWlEekM7Ozs7R0FJRztBQUNILE1BQWEsb0JBQXFCLFNBQVEsWUFBWSxDQUFDLE1BQU07SUFDM0QsWUFBWSxNQUFxQixFQUFFLElBQVksRUFBRSxLQUFnQztRQUMvRSxLQUFLLENBQUMsTUFBTSxFQUFFLElBQUksRUFBRTtZQUNsQixLQUFLLEVBQUUsS0FBSyxDQUFDLEtBQUs7WUFDbEIsUUFBUSxFQUFFLEtBQUssQ0FBQyxRQUFRO1lBQ3hCLFFBQVEsRUFBRSxZQUFZLENBQUMsY0FBYyxDQUFDLE1BQU07WUFDNUMsUUFBUSxFQUFFLFFBQVE7WUFDbEIsY0FBYyxFQUFFLFlBQVksQ0FBQyxhQUFhLEVBQUU7WUFDNUMsYUFBYSxFQUFFO2dCQUNiLFlBQVksRUFBRSxLQUFLLENBQUMsTUFBTSxDQUFDLFlBQVk7Z0JBQ3ZDLGNBQWMsRUFBRSxLQUFLLENBQUMsY0FBYzthQUNyQztTQUNGLENBQUMsQ0FBQztRQUVILG1DQUFtQztRQUNuQyxLQUFLLENBQUMsS0FBSyxDQUFDLFF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ZWxpbmU6UHV0Sm9iU3VjY2Vzc1Jlc3VsdCcpXG4gICAgICAgIC5hZGRBY3Rpb24oJ2NvZGVwaXBlbGluZTpQdXRKb2JGYWlsdXJlUmVzdWx0JykpO1xuICAgIH1cbiAgfVxuXG4gIHB1YmxpYyBvdXRwdXRBcnRpZmFjdHMoKTogY29kZXBpcGVsaW5lLkFydGlmYWN0W10ge1xuICAgIHJldHVybiB0aGlzLl9vdXRwdXRBcnRpZmFjdHM7XG4gIH1cblxuICBwdWJsaWMgb3V0cHV0QXJ0aWZhY3QoYXJ0aWZhY3ROYW1lOiBzdHJpbmcpOiBjb2RlcGlwZWxpbmUuQXJ0aWZhY3Qge1xuICAgIGNvbnN0IHJlc3VsdCA9IHRoaXMuX291dHB1dEFydGlmYWN0cy5maW5kKGEgPT4gKGEubmFtZSA9PT0gYXJ0aWZhY3ROYW1lKSk7XG4gICAgaWYgKHJlc3VsdCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoYENvdWxkIG5vdCBmaW5kIHRoZSBvdXRwdXQgQXJ0aWZhY3Qgd2l0aCBuYW1lICcke2FydGlmYWN0TmFtZX0nYCk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxuICB9XG59XG4iXX0= |
import iam = require('@aws-cdk/aws-iam'); | ||
import cdk = require('@aws-cdk/cdk'); | ||
import { FunctionProps } from './lambda'; | ||
import { FunctionRef } from './lambda-ref'; | ||
import { FunctionBase, FunctionImportProps } from './lambda-ref'; | ||
import { Permission } from './permission'; | ||
@@ -34,11 +34,12 @@ /** | ||
*/ | ||
export declare class SingletonFunction extends FunctionRef { | ||
export declare class SingletonFunction extends FunctionBase { | ||
readonly functionName: string; | ||
readonly functionArn: string; | ||
readonly role?: iam.Role | undefined; | ||
readonly role?: iam.IRole | undefined; | ||
protected readonly canCreatePermissions: boolean; | ||
private lambdaFunction; | ||
constructor(parent: cdk.Construct, name: string, props: SingletonFunctionProps); | ||
constructor(scope: cdk.Construct, id: string, props: SingletonFunctionProps); | ||
export(): FunctionImportProps; | ||
addPermission(name: string, permission: Permission): void; | ||
private ensureLambda; | ||
} |
@@ -12,5 +12,5 @@ "use strict"; | ||
*/ | ||
class SingletonFunction extends lambda_ref_1.FunctionRef { | ||
constructor(parent, name, props) { | ||
super(parent, name); | ||
class SingletonFunction extends lambda_ref_1.FunctionBase { | ||
constructor(scope, id, props) { | ||
super(scope, id); | ||
this.lambdaFunction = this.ensureLambda(props); | ||
@@ -22,2 +22,5 @@ this.functionArn = this.lambdaFunction.functionArn; | ||
} | ||
export() { | ||
return this.lambdaFunction.export(); | ||
} | ||
addPermission(name, permission) { | ||
@@ -29,3 +32,3 @@ return this.lambdaFunction.addPermission(name, permission); | ||
const stack = cdk.Stack.find(this); | ||
const existing = stack.tryFindChild(constructName); | ||
const existing = stack.node.tryFindChild(constructName); | ||
if (existing) { | ||
@@ -42,2 +45,2 @@ // Just assume this is true | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2luZ2xldG9uLWxhbWJkYS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNpbmdsZXRvbi1sYW1iZGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFDQSxvQ0FBcUM7QUFDckMscUNBQXFFO0FBQ3JFLDZDQUEyQztBQTJCM0M7Ozs7O0dBS0c7QUFDSCxNQUFhLGlCQUFrQixTQUFRLHdCQUFXO0lBT2hELFlBQVksTUFBcUIsRUFBRSxJQUFZLEVBQUUsS0FBNkI7UUFDNUUsS0FBSyxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsQ0FBQztRQUVwQixJQUFJLENBQUMsY0FBYyxHQUFHLElBQUksQ0FBQyxZQUFZLENBQUMsS0FBSyxDQUFDLENBQUM7UUFFL0MsSUFBSSxDQUFDLFdBQVcsR0FBRyxJQUFJLENBQUMsY0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WJsaWMgZXhwb3J0KCk6IEZ1bmN0aW9uSW1wb3J0UHJvcHMge1xuICAgIHJldHVybiB0aGlzLmxhbWJkYUZ1bmN0aW9uLmV4cG9ydCgpO1xuICB9XG5cbiAgcHVibGljIGFkZFBlcm1pc3Npb24obmFtZTogc3RyaW5nLCBwZXJtaXNzaW9uOiBQZXJtaXNzaW9uKSB7XG4gICAgcmV0dXJuIHRoaXMubGFtYmRhRnVuY3Rpb24uYWRkUGVybWlzc2lvbihuYW1lLCBwZXJtaXNzaW9uKTtcbiAgfVxuXG4gIHByaXZhdGUgZW5zdXJlTGFtYmRhKHByb3BzOiBTaW5nbGV0b25GdW5jdGlvblByb3BzKTogSUZ1bmN0aW9uIHtcbiAgICBjb25zdCBjb25zdHJ1Y3ROYW1lID0gKHByb3BzLmxhbWJkYVB1cnBvc2UgfHwgJ1NpbmdsZXRvbkxhbWJkYScpICsgc2x1Z2lmeShwcm9wcy51dWlkKTtcbiAgICBjb25zdCBzdGFjayA9IGNkay5TdGFjay5maW5kKHRoaXMpO1xuICAgIGNvbnN0IGV4aXN0aW5nID0gc3RhY2subm9kZS50cnlGaW5kQ2hpbGQoY29uc3RydWN0TmFtZSk7XG4gICAgaWYgKGV4aXN0aW5nKSB7XG4gICAgICAvLyBKdXN0IGFzc3VtZSB0aGlzIGlzIHRydWVcbiAgICAgIHJldHVybiBleGlzdGluZyBhcyBGdW5jdGlvbkJhc2U7XG4gICAgfVxuXG4gICAgcmV0dXJuIG5ldyBMYW1iZGFGdW5jdGlvbihzdGFjaywgY29uc3RydWN0TmFtZSwgcHJvcHMpO1xuICB9XG59XG5cbmZ1bmN0aW9uIHNsdWdpZnkoeDogc3RyaW5nKTogc3RyaW5nIHtcbiAgcmV0dXJuIHgucmVwbGFjZSgvW15hLXpBLVowLTldL2csICcnKTtcbn1cbiJdfQ== |
{ | ||
"name": "@aws-cdk/aws-lambda", | ||
"version": "0.21.0", | ||
"version": "0.22.0", | ||
"description": "CDK Constructs for AWS Lambda", | ||
@@ -37,3 +37,5 @@ "main": "lib/index.js", | ||
"pkglint": "pkglint -f", | ||
"package": "cdk-package" | ||
"package": "cdk-package", | ||
"awslint": "cdk-awslint", | ||
"cfn2ts": "cfn2ts" | ||
}, | ||
@@ -59,37 +61,37 @@ "cdk-build": { | ||
"devDependencies": { | ||
"@aws-cdk/assert": "^0.21.0", | ||
"cdk-build-tools": "^0.21.0", | ||
"cdk-integ-tools": "^0.21.0", | ||
"cfn2ts": "^0.21.0", | ||
"pkglint": "^0.21.0" | ||
"@aws-cdk/assert": "^0.22.0", | ||
"cdk-build-tools": "^0.22.0", | ||
"cdk-integ-tools": "^0.22.0", | ||
"cfn2ts": "^0.22.0", | ||
"pkglint": "^0.22.0" | ||
}, | ||
"dependencies": { | ||
"@aws-cdk/assets": "^0.21.0", | ||
"@aws-cdk/aws-cloudwatch": "^0.21.0", | ||
"@aws-cdk/aws-codepipeline-api": "^0.21.0", | ||
"@aws-cdk/aws-ec2": "^0.21.0", | ||
"@aws-cdk/aws-events": "^0.21.0", | ||
"@aws-cdk/aws-iam": "^0.21.0", | ||
"@aws-cdk/aws-logs": "^0.21.0", | ||
"@aws-cdk/aws-s3": "^0.21.0", | ||
"@aws-cdk/aws-s3-notifications": "^0.21.0", | ||
"@aws-cdk/aws-sqs": "^0.21.0", | ||
"@aws-cdk/aws-stepfunctions": "^0.21.0", | ||
"@aws-cdk/cdk": "^0.21.0", | ||
"@aws-cdk/cx-api": "^0.21.0" | ||
"@aws-cdk/assets": "^0.22.0", | ||
"@aws-cdk/aws-cloudwatch": "^0.22.0", | ||
"@aws-cdk/aws-codepipeline-api": "^0.22.0", | ||
"@aws-cdk/aws-ec2": "^0.22.0", | ||
"@aws-cdk/aws-events": "^0.22.0", | ||
"@aws-cdk/aws-iam": "^0.22.0", | ||
"@aws-cdk/aws-logs": "^0.22.0", | ||
"@aws-cdk/aws-s3": "^0.22.0", | ||
"@aws-cdk/aws-s3-notifications": "^0.22.0", | ||
"@aws-cdk/aws-sqs": "^0.22.0", | ||
"@aws-cdk/aws-stepfunctions": "^0.22.0", | ||
"@aws-cdk/cdk": "^0.22.0", | ||
"@aws-cdk/cx-api": "^0.22.0" | ||
}, | ||
"homepage": "https://github.com/awslabs/aws-cdk", | ||
"peerDependencies": { | ||
"@aws-cdk/assets": "^0.21.0", | ||
"@aws-cdk/aws-cloudwatch": "^0.21.0", | ||
"@aws-cdk/aws-codepipeline-api": "^0.21.0", | ||
"@aws-cdk/aws-ec2": "^0.21.0", | ||
"@aws-cdk/aws-events": "^0.21.0", | ||
"@aws-cdk/aws-iam": "^0.21.0", | ||
"@aws-cdk/aws-logs": "^0.21.0", | ||
"@aws-cdk/aws-s3": "^0.21.0", | ||
"@aws-cdk/aws-s3-notifications": "^0.21.0", | ||
"@aws-cdk/aws-sqs": "^0.21.0", | ||
"@aws-cdk/aws-stepfunctions": "^0.21.0", | ||
"@aws-cdk/cdk": "^0.21.0" | ||
"@aws-cdk/assets": "^0.22.0", | ||
"@aws-cdk/aws-cloudwatch": "^0.22.0", | ||
"@aws-cdk/aws-codepipeline-api": "^0.22.0", | ||
"@aws-cdk/aws-ec2": "^0.22.0", | ||
"@aws-cdk/aws-events": "^0.22.0", | ||
"@aws-cdk/aws-iam": "^0.22.0", | ||
"@aws-cdk/aws-logs": "^0.22.0", | ||
"@aws-cdk/aws-s3": "^0.22.0", | ||
"@aws-cdk/aws-s3-notifications": "^0.22.0", | ||
"@aws-cdk/aws-sqs": "^0.22.0", | ||
"@aws-cdk/aws-stepfunctions": "^0.22.0", | ||
"@aws-cdk/cdk": "^0.22.0" | ||
}, | ||
@@ -96,0 +98,0 @@ "engines": { |
@@ -90,2 +90,21 @@ ## AWS Lambda Construct Library | ||
The Lambda Action can have up to 5 inputs, | ||
and up to 5 outputs: | ||
```typescript | ||
const lambdaAction = fn.addToPipeline(lambdaStage, 'Lambda', { | ||
inputArtifacts: [ | ||
sourceAction.outputArtifact, | ||
buildAction.outputArtifact, | ||
], | ||
outputArtifactNames: [ | ||
'Out1', | ||
'Out2', | ||
], | ||
}); | ||
lambdaAction.outputArtifacts(); // returns the list of output Artifacts | ||
lambdaAction.outputArtifact('Out2'); // returns the named output Artifact, or throws an exception if not found | ||
``` | ||
See [the AWS documentation](https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-invoke-lambda-function.html) | ||
@@ -92,0 +111,0 @@ on how to write a Lambda function invoked from CodePipeline. |
@@ -7,4 +7,4 @@ "use strict"; | ||
class TestStack extends cdk.Stack { | ||
constructor(parent, id) { | ||
super(parent, id); | ||
constructor(scope, id) { | ||
super(scope, id); | ||
/// !show | ||
@@ -22,2 +22,2 @@ new lambda.Function(this, 'MyLambda', { | ||
app.run(); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZWcuYXNzZXRzLmZpbGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbnRlZy5hc3NldHMuZmlsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLG9DQUFxQztBQUNyQyw2QkFBOEI7QUFDOUIsaUNBQWtDO0FBRWxDLE1BQU0sU0FBVSxTQUFRLEdBQUcsQ0FBQyxLQUFLO0lBQy9CLFlBQVksTUFBZSxFQUFFLEVBQVU7UUFDckMsS0FBSyxDQUFDLE1BQU0sRUFBRSxFQUFFLENBQUMsQ0FBQztRQUVsQixTQUFTO1FBQ1QsSUFBSSxNQUFNLENBQUMsUUFBUSxDQUFDLElBQUksRUFBRSxVQUFVLEVBQUU7WUFDcEMsSUFBSSxFQUFFLE1BQU0sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsU0FBUyxFQUFFLGFBQWEsQ0FBQyxDQUFDO1lBQzNELE9BQU8sRUFBRSxZQUFZO1lBQ3JCLE9BQU8sRUFBRSxNQUFNLENBQUMsT0FBTyxDQUFDLFFBQVE7U0FDakMsQ0FBQyxDQUFDO1FBQ0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BlLCBpZCk7XG5cbiAgICAvLy8gIXNob3dcbiAgICBuZXcgbGFtYmRhLkZ1bmN0aW9uKHRoaXMsICdNeUxhbWJkYScsIHtcbiAgICAgIGNvZGU6IGxhbWJkYS5Db2RlLmZpbGUocGF0aC5qb2luKF9fZGlybmFtZSwgJ2hhbmRsZXIuemlwJykpLFxuICAgICAgaGFuZGxlcjogJ2luZGV4Lm1haW4nLFxuICAgICAgcnVudGltZTogbGFtYmRhLlJ1bnRpbWUuUHl0aG9uMzZcbiAgICB9KTtcbiAgICAvLy8gIWhpZGVcbiAgfVxufVxuXG5jb25zdCBhcHAgPSBuZXcgY2RrLkFwcCgpO1xuXG5uZXcgVGVzdFN0YWNrKGFwcCwgJ2xhbWJkYS10ZXN0LWFzc2V0cy1maWxlJyk7XG5cbmFwcC5ydW4oKTtcbiJdfQ== |
@@ -7,4 +7,4 @@ "use strict"; | ||
class TestStack extends cdk.Stack { | ||
constructor(parent, id) { | ||
super(parent, id); | ||
constructor(scope, id) { | ||
super(scope, id); | ||
/// !show | ||
@@ -22,2 +22,2 @@ new lambda.Function(this, 'MyLambda', { | ||
app.run(); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZWcuYXNzZXRzLmxpdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImludGVnLmFzc2V0cy5saXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxvQ0FBcUM7QUFDckMsNkJBQThCO0FBQzlCLGlDQUFrQztBQUVsQyxNQUFNLFNBQVUsU0FBUSxHQUFHLENBQUMsS0FBSztJQUMvQixZQUFZLE1BQWUsRUFBRSxFQUFVO1FBQ3JDLEtBQUssQ0FBQyxNQUFNLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFFbEIsU0FBUztRQUNULElBQUksTUFBTSxDQUFDLFFBQVEsQ0FBQyxJQUFJLEVBQUUsVUFBVSxFQUFFO1lBQ3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XJlKCdAYXdzLWNkay9jZGsnKTtcbmltcG9ydCBwYXRoID0gcmVxdWlyZSgncGF0aCcpO1xuaW1wb3J0IGxhbWJkYSA9IHJlcXVpcmUoJy4uL2xpYicpO1xuXG5jbGFzcyBUZXN0U3RhY2sgZXh0ZW5kcyBjZGsuU3RhY2sge1xuICBjb25zdHJ1Y3RvcihzY29wZTogY2RrLkFwcCwgaWQ6IHN0cmluZykge1xuICAgIHN1cGVyKHNjb3BlLCBpZCk7XG5cbiAgICAvLy8gIXNob3dcbiAgICBuZXcgbGFtYmRhLkZ1bmN0aW9uKHRoaXMsICdNeUxhbWJkYScsIHtcbiAgICAgIGNvZGU6IGxhbWJkYS5Db2RlLmFzc2V0KHBhdGguam9pbihfX2Rpcm5hbWUsICdteS1sYW1iZGEtaGFuZGxlcicpKSxcbiAgICAgIGhhbmRsZXI6ICdpbmRleC5tYWluJyxcbiAgICAgIHJ1bnRpbWU6IGxhbWJkYS5SdW50aW1lLlB5dGhvbjM2XG4gICAgfSk7XG4gICAgLy8vICFoaWRlXG4gIH1cbn1cblxuY29uc3QgYXBwID0gbmV3IGNkay5BcHAoKTtcblxubmV3IFRlc3RTdGFjayhhcHAsICdsYW1iZGEtdGVzdC1hc3NldHMnKTtcblxuYXBwLnJ1bigpO1xuIl19 |
@@ -30,3 +30,3 @@ "use strict"; | ||
FunctionName: { Ref: "MyLambdaCCE802FB" }, | ||
FunctionVersion: cdk_1.resolve(version.functionVersion), | ||
FunctionVersion: stack.node.resolve(version.functionVersion), | ||
Name: "prod" | ||
@@ -53,7 +53,7 @@ } | ||
assert_1.expect(stack).to(assert_1.haveResource('AWS::Lambda::Alias', { | ||
FunctionVersion: cdk_1.resolve(version1.functionVersion), | ||
FunctionVersion: stack.node.resolve(version1.functionVersion), | ||
RoutingConfig: { | ||
AdditionalVersionWeights: [ | ||
{ | ||
FunctionVersion: cdk_1.resolve(version2.functionVersion), | ||
FunctionVersion: stack.node.resolve(version2.functionVersion), | ||
FunctionWeight: 0.1 | ||
@@ -106,3 +106,3 @@ } | ||
assert_1.expect(stack).to(assert_1.haveResource('AWS::Lambda::Permission', { | ||
FunctionName: cdk_1.resolve(fn.functionName), | ||
FunctionName: stack.node.resolve(fn.functionName), | ||
Principal: "123456" | ||
@@ -113,2 +113,2 @@ })); | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5hbGlhcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QuYWxpYXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDRDQUE4RTtBQUM5RSw4Q0FBb0Q7QUFDcEQsc0NBQThDO0FBRTlDLGlDQUFrQztBQUVsQyxpQkFBUztJQUNQLHFCQUFxQixDQUFDLElBQVU7UUFDOUIsTUFBTSxLQUFLLEdBQUcsSUFBSSxXQUFLLEVBQUUsQ0FBQztRQUMxQixNQUFNLEVBQUUsR0FBRyxJQUFJLE1BQU0sQ0FBQyxRQUFRLENBQUMsS0FBSyxFQUFFLFVBQVUsRUFBRTtZQUNoRCxJQUFJLEVBQUUsSUFBSSxNQUFNLENBQUMsVUFBVSxDQUFDLFNBQVMsQ0FBQztZQUN0QyxPQUFPLEVBQUUsYUFBYTtZQUN0QixPQUFPLEVBQUUsTUFBTSxDQUFDLE9BQU8sQ0FBQyxTQUFTO1NBQ2xDLENBQUMsQ0FBQztRQUVILE1BQU0sT0FBTyxHQUFHLEVBQUUsQ0FBQyxVQUFVLENBQUMsR0FBRyxDQUFDLENBQUM7UUFFbkMsSUFBSSxNQUFNLENBQUMsS0FBSyxDQUFDLEtBQUssRUFBRSxPQUFPLEVBQUU7WUFDL0IsU0FBUyxFQUFFLE1BQU07WUFDakIsT0FBTztTQUNSLENBQUMsQ0FBQztRQUVILGVBQU0sQ0FBQyxLQUFLLENBQUMsQ0FBQyxFQUFFLENBQUMsOEJBQXFCLENBQUM7WUFDckMsd0JBQXdCLEVBQU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kb25lKCk7XG4gIH1cbn07XG4iXX0= |
@@ -11,4 +11,5 @@ import { Test } from 'nodeunit'; | ||
'only one Asset object gets created even if multiple functions use the same AssetCode'(test: Test): void; | ||
'adds code asset metadata'(test: Test): void; | ||
}; | ||
}; | ||
export = _default; |
"use strict"; | ||
const assert_1 = require("@aws-cdk/assert"); | ||
const assets = require("@aws-cdk/assets"); | ||
const cdk = require("@aws-cdk/cdk"); | ||
const cxapi = require("@aws-cdk/cx-api"); | ||
const path = require("path"); | ||
@@ -71,5 +73,25 @@ const lambda = require("../lib"); | ||
test.done(); | ||
}, | ||
'adds code asset metadata'(test) { | ||
// GIVEN | ||
const stack = new cdk.Stack(); | ||
stack.node.setContext(cxapi.ASSET_RESOURCE_METADATA_ENABLED_CONTEXT, true); | ||
const location = path.join(__dirname, 'my-lambda-handler'); | ||
// WHEN | ||
new lambda.Function(stack, 'Func1', { | ||
code: lambda.Code.asset(location), | ||
runtime: lambda.Runtime.NodeJS810, | ||
handler: 'foom', | ||
}); | ||
// THEN | ||
assert_1.expect(stack).to(assert_1.haveResource('AWS::Lambda::Function', { | ||
Metadata: { | ||
[cxapi.ASSET_RESOURCE_METADATA_PATH_KEY]: location, | ||
[cxapi.ASSET_RESOURCE_METADATA_PROPERTY_KEY]: 'Code' | ||
} | ||
}, assert_1.ResourcePart.CompleteDefinition)); | ||
test.done(); | ||
} | ||
} | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5jb2RlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsidGVzdC5jb2RlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwwQ0FBMkM7QUFDM0Msb0NBQXFDO0FBRXJDLDZCQUE4QjtBQUM5QixpQ0FBa0M7QUFvRWxDLFNBQVMsY0FBYyxDQUFDLElBQWlCLEVBQUUsVUFBMEIsTUFBTSxDQUFDLE9BQU8sQ0FBQyxTQUF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S0VZXTogJ0NvZGUnXG4gICAgICAgIH1cbiAgICAgIH0sIFJlc291cmNlUGFydC5Db21wbGV0ZURlZmluaXRpb24pKTtcbiAgICAgIHRlc3QuZG9uZSgpO1xuICAgIH1cbiAgfVxufTtcblxuZnVuY3Rpb24gZGVmaW5lRnVuY3Rpb24oY29kZTogbGFtYmRhLkNvZGUsIHJ1bnRpbWU6IGxhbWJkYS5SdW50aW1lID0gbGFtYmRhLlJ1bnRpbWUuTm9kZUpTODEwKSB7XG4gIGNvbnN0IHN0YWNrID0gbmV3IGNkay5TdGFjaygpO1xuICByZXR1cm4gbmV3IGxhbWJkYS5GdW5jdGlvbihzdGFjaywgJ0Z1bmMnLCB7XG4gICAgaGFuZGxlcjogJ2Zvb20nLFxuICAgIGNvZGUsIHJ1bnRpbWVcbiAgfSk7XG59XG5cbmZ1bmN0aW9uIGdlbmVyYXRlUmFuZG9tU3RyaW5nKGJ5dGVzOiBudW1iZXIpIHtcbiAgbGV0IHMgPSAnJztcbiAgZm9yIChsZXQgaSA9IDA7IGkgPCBieXRlczsgKytpKSB7XG4gICAgcyArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKE1hdGgucm91bmQoTWF0aC5yYW5kb20oKSAqIDI1NikpO1xuICB9XG4gIHJldHVybiBzO1xufVxuIl19 |
@@ -12,3 +12,3 @@ import { Test } from 'nodeunit'; | ||
'import/export': { | ||
'lambda.export() can be used to add Outputs to the stack and returns a LambdaRef object'(test: Test): void; | ||
'lambda.export() can be used to add Outputs to the stack and returns an IFunction object'(test: Test): void; | ||
}; | ||
@@ -15,0 +15,0 @@ 'Lambda can serve as EventRule target, permission gets added'(test: Test): void; |
@@ -101,3 +101,3 @@ "use strict"; | ||
// WHEN | ||
const importedLambda = lambda.FunctionRef.import(stack2, 'Lambda', this.lambda.export()); | ||
const importedLambda = lambda.Function.import(stack2, 'Lambda', this.lambda.export()); | ||
importedLambda.connections.allowTo(somethingConnectable, new ec2.TcpAllPorts(), 'Lambda can call connectable'); |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ByZWFkb25seSBjb25uZWN0aW9uczogZWMyLkNvbm5lY3Rpb25zKSB7XG4gIH1cbn1cbiJdfQ== |
@@ -25,5 +25,56 @@ { | ||
"strictNullChecks": true, | ||
"target": "ES2018" | ||
"target": "ES2018", | ||
"composite": true | ||
}, | ||
"include": [ | ||
"**/*.ts" | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
], | ||
"references": [ | ||
{ | ||
"path": "../assets" | ||
}, | ||
{ | ||
"path": "../aws-cloudwatch" | ||
}, | ||
{ | ||
"path": "../aws-codepipeline-api" | ||
}, | ||
{ | ||
"path": "../aws-ec2" | ||
}, | ||
{ | ||
"path": "../aws-events" | ||
}, | ||
{ | ||
"path": "../aws-iam" | ||
}, | ||
{ | ||
"path": "../aws-logs" | ||
}, | ||
{ | ||
"path": "../aws-s3" | ||
}, | ||
{ | ||
"path": "../aws-s3-notifications" | ||
}, | ||
{ | ||
"path": "../aws-sqs" | ||
}, | ||
{ | ||
"path": "../aws-stepfunctions" | ||
}, | ||
{ | ||
"path": "../cdk" | ||
}, | ||
{ | ||
"path": "../cx-api" | ||
}, | ||
{ | ||
"path": "../assert" | ||
} | ||
], | ||
"_generated_by_jsii_": "Generated by jsii - safe to delete, and ideally should be in .gitignore" | ||
} |
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 not supported yet
Sorry, the diff of this file is not supported yet
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
141
834240
6061
+ Added@aws-cdk/assets@0.22.0(transitive)
+ Added@aws-cdk/aws-autoscaling-api@0.22.0(transitive)
+ Added@aws-cdk/aws-cloudwatch@0.22.0(transitive)
+ Added@aws-cdk/aws-codepipeline-api@0.22.0(transitive)
+ Added@aws-cdk/aws-ec2@0.22.0(transitive)
+ Added@aws-cdk/aws-events@0.22.0(transitive)
+ Added@aws-cdk/aws-iam@0.22.0(transitive)
+ Added@aws-cdk/aws-kms@0.22.0(transitive)
+ Added@aws-cdk/aws-logs@0.22.0(transitive)
+ Added@aws-cdk/aws-s3@0.22.0(transitive)
+ Added@aws-cdk/aws-s3-notifications@0.22.0(transitive)
+ Added@aws-cdk/aws-sqs@0.22.0(transitive)
+ Added@aws-cdk/aws-stepfunctions@0.22.0(transitive)
+ Added@aws-cdk/cdk@0.22.0(transitive)
+ Added@aws-cdk/cx-api@0.22.0(transitive)
- Removed@aws-cdk/assets@0.21.0(transitive)
- Removed@aws-cdk/aws-autoscaling-api@0.21.0(transitive)
- Removed@aws-cdk/aws-cloudwatch@0.21.0(transitive)
- Removed@aws-cdk/aws-codepipeline-api@0.21.0(transitive)
- Removed@aws-cdk/aws-ec2@0.21.0(transitive)
- Removed@aws-cdk/aws-events@0.21.0(transitive)
- Removed@aws-cdk/aws-iam@0.21.0(transitive)
- Removed@aws-cdk/aws-kms@0.21.0(transitive)
- Removed@aws-cdk/aws-logs@0.21.0(transitive)
- Removed@aws-cdk/aws-s3@0.21.0(transitive)
- Removed@aws-cdk/aws-s3-notifications@0.21.0(transitive)
- Removed@aws-cdk/aws-sqs@0.21.0(transitive)
- Removed@aws-cdk/aws-stepfunctions@0.21.0(transitive)
- Removed@aws-cdk/cdk@0.21.0(transitive)
- Removed@aws-cdk/cx-api@0.21.0(transitive)
Updated@aws-cdk/assets@^0.22.0
Updated@aws-cdk/aws-ec2@^0.22.0
Updated@aws-cdk/aws-events@^0.22.0
Updated@aws-cdk/aws-iam@^0.22.0
Updated@aws-cdk/aws-logs@^0.22.0
Updated@aws-cdk/aws-s3@^0.22.0
Updated@aws-cdk/aws-sqs@^0.22.0
Updated@aws-cdk/cdk@^0.22.0
Updated@aws-cdk/cx-api@^0.22.0