Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(lambda): renamed the lambda.Runtime enum values from NodeJS to Nodejs #2815

Merged
merged 4 commits into from
Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@aws-cdk/assets-docker/lib/adopted-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class AdoptedRepository extends ecr.RepositoryBase {
super(scope, id);

const fn = new lambda.SingletonFunction(this, 'Function', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
lambdaPurpose: 'AdoptEcrRepository',
handler: 'handler.handler',
code: lambda.Code.asset(path.join(__dirname, 'adopt-repository')),
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-apigateway/test/integ.restapi.books.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ class BookStack extends cdk.Stack {
super(scope, id);

const booksHandler = new apigw.LambdaIntegration(new lambda.Function(this, 'BooksHandler', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
handler: 'index.handler',
code: lambda.Code.inline(`exports.handler = ${echoHandlerCode}`)
}));

const bookHandler = new apigw.LambdaIntegration(new lambda.Function(this, 'BookHandler', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
handler: 'index.handler',
code: lambda.Code.inline(`exports.handler = ${echoHandlerCode}`)
}));

const hello = new apigw.LambdaIntegration(new lambda.Function(this, 'Hello', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
handler: 'index.handler',
code: lambda.Code.inline(`exports.handler = ${helloCode}`)
}));
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apigateway/test/integ.restapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Test extends cdk.Stack {
});

const handler = new lambda.Function(this, 'MyHandler', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
code: lambda.Code.inline(`exports.handler = ${handlerCode}`),
handler: 'index.handler',
});
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-apigateway/test/test.lambda-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export = {
const handler = new lambda.Function(stack, 'handler', {
handler: 'index.handler',
code: lambda.Code.inline('boom'),
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});

// WHEN
Expand Down Expand Up @@ -78,7 +78,7 @@ export = {
const handler = new lambda.Function(stack, 'handler', {
handler: 'index.handler',
code: lambda.Code.inline('boom'),
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});
const alias = new lambda.Alias(stack, 'alias', {
aliasName: 'my-alias',
Expand Down Expand Up @@ -145,7 +145,7 @@ export = {
const handler = new lambda.Function(stack, 'handler', {
handler: 'index.handler',
code: lambda.Code.inline('boom'),
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});

// WHEN
Expand Down Expand Up @@ -184,7 +184,7 @@ export = {
const handler = new lambda.Function(stack, 'handler', {
handler: 'index.handler',
code: lambda.Code.inline('boom'),
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});

test.throws(() => new apigw.LambdaRestApi(stack, 'lambda-rest-api', {
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-apigateway/test/test.lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export = {
// GIVEN
const stack = new cdk.Stack();
const fn = new lambda.Function(stack, 'Handler', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
code: lambda.Code.inline('foo'),
handler: 'index.handler'
});
Expand Down Expand Up @@ -106,7 +106,7 @@ export = {
// GIVEN
const stack = new cdk.Stack();
const fn = new lambda.Function(stack, 'Handler', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
code: lambda.Code.inline('foo'),
handler: 'index.handler'
});
Expand All @@ -132,7 +132,7 @@ export = {
const api = new apigateway.RestApi(stack, 'test-api');

const handler = new lambda.Function(stack, 'MyFunc', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
handler: 'index.handler',
code: lambda.Code.inline(``)
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('given an AutoScalingGroup', () => {
// GIVEN
const fn = new lambda.Function(stack, 'Fn', {
code: lambda.Code.inline('foo'),
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
handler: 'index.index',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class DnsValidatedCertificate extends cdk.Resource implements ICertificat
const requestorFunction = new lambda.Function(this, 'CertificateRequestorFunction', {
code: lambda.Code.asset(path.resolve(__dirname, '..', 'lambda-packages', 'dns_validated_certificate_handler', 'lib')),
handler: 'index.certificateRequestHandler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
timeout: 15 * 60 // 15 minutes
});
requestorFunction.addToRolePolicy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class AwsCustomResource extends cdk.Construct {

const provider = new lambda.SingletonFunction(this, 'Provider', {
code: lambda.Code.asset(path.join(__dirname, 'aws-custom-resource-provider')),
runtime: lambda.Runtime.NodeJS10x,
runtime: lambda.Runtime.Nodejs10x,
handler: 'index.handler',
uuid: '679f53fa-c002-430c-b0da-5b7982bd2287',
lambdaPurpose: 'AWS'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const stack = new cdk.Stack(app, 'aws-cdk-codedeploy-lambda');
const handler = new lambda.Function(stack, `Handler`, {
code: lambda.Code.asset(path.join(__dirname, 'handler')),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});
const version = handler.addVersion('1');
const blueGreenAlias = new lambda.Alias(stack, `Alias`, {
Expand All @@ -22,12 +22,12 @@ const blueGreenAlias = new lambda.Alias(stack, `Alias`, {
const preHook = new lambda.Function(stack, `PreHook`, {
code: lambda.Code.asset(path.join(__dirname, 'preHook')),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810
runtime: lambda.Runtime.Nodejs810
});
const postHook = new lambda.Function(stack, `PostHook`, {
code: lambda.Code.asset(path.join(__dirname, 'postHook')),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810
runtime: lambda.Runtime.Nodejs810
});

new codedeploy.LambdaDeploymentGroup(stack, 'BlueGreenDeployment', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function mockFunction(stack: cdk.Stack, id: string) {
return new lambda.Function(stack, id, {
code: lambda.Code.inline('mock'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810
runtime: lambda.Runtime.Nodejs810
});
}
function mockAlias(stack: cdk.Stack) {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codepipeline-actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ const lambdaCode = lambda.Code.cfnParameters();
const func = new lambda.Function(lambdaStack, 'Lambda', {
code: lambdaCode,
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});
// used to make sure each CDK synthesis produces a different Version
const version = func.newVersion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const lambdaCode = lambda.Code.cfnParameters();
new lambda.Function(lambdaStack, 'Lambda', {
code: lambdaCode,
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});
// other resources that your Lambda needs, added to the lambdaStack...

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const lambdaFun = new lambda.Function(stack, 'LambdaFun', {
};
`),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});
const lambdaStage = pipeline.addStage({ name: 'Lambda' });
lambdaStage.addAction(new cpactions.LambdaInvokeAction({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function stackIncludingLambdaInvokeCodePipeline(userParams: { [key: string]: any
lambda: new lambda.Function(stack, 'Lambda', {
code: lambda.Code.cfnParameters(),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
}),
userParameters: userParams,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ export = {
const lambdaFun = new lambda.Function(stack, 'Function', {
code: new lambda.InlineCode('bla'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});

const pipeline = new codepipeline.Pipeline(stack, 'Pipeline');
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-cognito/test/test.user-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export = {
const fn = new lambda.Function(stack, 'MyLambda', {
code: new lambda.InlineCode('foo'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});

// WHEN
Expand Down Expand Up @@ -56,7 +56,7 @@ export = {
const fn = new lambda.Function(stack, 'MyLambda', {
code: new lambda.InlineCode('foo'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});

// WHEN
Expand Down Expand Up @@ -93,7 +93,7 @@ export = {
const fn = new lambda.Function(stack, 'MyLambda', {
code: new lambda.InlineCode('foo'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
});

// WHEN
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-config/test/integ.rule.lit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ConfigStack extends cdk.Stack {
const fn = new lambda.Function(this, 'CustomFunction', {
code: lambda.AssetCode.inline('exports.handler = (event) => console.log(event);'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810
runtime: lambda.Runtime.Nodejs810
});

const customRule = new config.CustomRule(this, 'Custom', {
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-config/test/test.rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export = {
const fn = new lambda.Function(stack, 'Function', {
code: lambda.AssetCode.inline('foo'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810
runtime: lambda.Runtime.Nodejs810
});

// WHEN
Expand Down Expand Up @@ -210,7 +210,7 @@ export = {
const fn = new lambda.Function(stack, 'Function', {
code: lambda.AssetCode.inline('foo'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810
runtime: lambda.Runtime.Nodejs810
});

// WHEN
Expand All @@ -231,7 +231,7 @@ export = {
const fn = new lambda.Function(stack, 'Function', {
code: lambda.AssetCode.inline('foo'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810
runtime: lambda.Runtime.Nodejs810
});

// THEN
Expand All @@ -252,7 +252,7 @@ export = {
const fn = new lambda.Function(stack, 'Function', {
code: lambda.Code.inline('dummy'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS810
runtime: lambda.Runtime.Nodejs810
});

// WHEN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class GlobalTableCoordinator extends cdk.Stack {
code: lambda.Code.asset(path.resolve(__dirname, "../", "lambda-packages", "aws-global-table-coordinator", "lib")),
description: "Lambda to make DynamoDB a global table",
handler: "index.handler",
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
timeout: 300,
uuid: "D38B65A6-6B54-4FB6-9BAD-9CD40A6DAC12",
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const app = new cdk.App();
const stack = new cdk.Stack(app, 'lambda-events');

const fn = new lambda.Function(stack, 'MyFunc', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
handler: 'index.handler',
code: lambda.Code.inline(`exports.handler = ${handler.toString()}`)
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class TestFunction extends lambda.Function {
super(scope, id, {
handler: 'index.handler',
code: lambda.Code.inline(`exports.handler = ${handler.toString()}`),
runtime: lambda.Runtime.NodeJS810
runtime: lambda.Runtime.Nodejs810
});
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-lambda-event-sources/test/test.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export = {
const handler = new lambda.Function(stack, 'MyFunc', {
code: lambda.Code.inline('boom'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS,
runtime: lambda.Runtime.Nodejs,
});

// WHEN
Expand All @@ -37,7 +37,7 @@ export = {
const handler = new lambda.Function(stack, 'MyFunc', {
code: lambda.Code.inline('boom'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS,
runtime: lambda.Runtime.Nodejs,
});

// WHEN
Expand Down Expand Up @@ -74,7 +74,7 @@ export = {
const handler = new lambda.Function(stack, 'MyFunc', {
code: lambda.Code.inline('boom'),
handler: 'index.handler',
runtime: lambda.Runtime.NodeJS,
runtime: lambda.Runtime.Nodejs,
});

// WHEN
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This construct library allows you to define AWS Lambda Functions.
import lambda = require('@aws-cdk/aws-lambda');

const fn = new lambda.Function(this, 'MyFunction', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
handler: 'index.handler',
code: lambda.Code.asset('./lambda-handler'),
});
Expand Down Expand Up @@ -100,7 +100,7 @@ See the documentation for the __@aws-cdk/aws-lambda-event-sources__ module for m
import lambda = require('@aws-cdk/aws-lambda');

const fn = new lambda.Function(this, 'MyFunction', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
handler: 'index.handler',
code: lambda.Code.inline('exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }'),
deadLetterQueueEnabled: true
Expand All @@ -115,7 +115,7 @@ to learn more about AWS Lambdas and DLQs.
import lambda = require('@aws-cdk/aws-lambda');

const fn = new lambda.Function(this, 'MyFunction', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
handler: 'index.handler',
code: lambda.Code.inline('exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }'),
tracing: lambda.Tracing.Active
Expand All @@ -130,7 +130,7 @@ to learn more about AWS Lambda's X-Ray support.
import lambda = require('@aws-cdk/aws-lambda');

const fn = new lambda.Function(this, 'MyFunction', {
runtime: lambda.Runtime.NodeJS810,
runtime: lambda.Runtime.Nodejs810,
handler: 'index.handler',
code: lambda.Code.inline('exports.handler = function(event, ctx, cb) { return cb(null, "hi"); }'),
reservedConcurrentExecutions: 100
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda/lib/log-retention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class LogRetention extends cdk.Construct {
// Custom resource provider
const provider = new SingletonFunction(this, 'Provider', {
code: Code.asset(path.join(__dirname, 'log-retention-provider')),
runtime: Runtime.NodeJS810,
runtime: Runtime.Nodejs810,
handler: 'index.handler',
uuid: 'aae0aa3c-5b4d-4f87-b02d-85b201efdd8a',
lambdaPurpose: 'LogRetention',
Expand Down
Loading