diff --git a/cdk/lib/constructs/cron-lambda-construct.ts b/cdk/lib/constructs/cron-lambda-construct.ts index 124df4f..f77a43f 100644 --- a/cdk/lib/constructs/cron-lambda-construct.ts +++ b/cdk/lib/constructs/cron-lambda-construct.ts @@ -19,7 +19,7 @@ export interface CronLambdaConstructProps { export class CronLambdaConstruct extends Construct { readonly lambda_1G: IFunction; - readonly lambda_2G: IFunction; + readonly lambda_4G: IFunction; constructor(scope: Construct, id: string, props: CronLambdaConstructProps) { super(scope, id); @@ -54,12 +54,12 @@ export class CronLambdaConstruct extends Construct { memorySize: 1024, }); - this.lambda_2G = new Function(this, 'CronLambda_2G', { + this.lambda_4G = new Function(this, 'CronLambda_4G', { ...lambdaBaseProps, - memorySize: 1024 * 2, + memorySize: 1024 * 4, }); - for (const fn of [this.lambda_1G, this.lambda_2G]) { + for (const fn of [this.lambda_1G, this.lambda_4G]) { props.dataBucket.grantRead(fn, 'raw/LH_Public_Data/flightschedules/*'); props.dataBucket.grantWrite(fn, 'raw/LH_Public_Data/*'); props.dataBucket.grantWrite(fn, 'raw/ourairports_data/*'); diff --git a/cdk/lib/constructs/sfn-construct.ts b/cdk/lib/constructs/sfn-construct.ts index c4db73c..5cf6abc 100644 --- a/cdk/lib/constructs/sfn-construct.ts +++ b/cdk/lib/constructs/sfn-construct.ts @@ -17,7 +17,7 @@ import { LambdaInvoke } from 'aws-cdk-lib/aws-stepfunctions-tasks'; export interface SfnConstructProps { dataBucket: IBucket; cronLambda_1G: IFunction; - cronLambda_2G: IFunction; + cronLambda_4G: IFunction; webhookUrl: cdk.SecretValue; } @@ -105,7 +105,7 @@ export class SfnConstruct extends Construct { // region conversion .otherwise( new LambdaInvoke(this, 'ConvertSchedulesTask', { - lambdaFunction: props.cronLambda_2G, + lambdaFunction: props.cronLambda_4G, payload: TaskInput.fromObject({ 'action': 'convert_flight_schedules', 'params': { @@ -121,7 +121,7 @@ export class SfnConstruct extends Construct { retryOnServiceExceptions: true, }) .next(new LambdaInvoke(this, 'ConvertFlightsTask', { - lambdaFunction: props.cronLambda_2G, + lambdaFunction: props.cronLambda_4G, payload: TaskInput.fromObject({ 'action': 'convert_flights', 'params': { @@ -137,7 +137,7 @@ export class SfnConstruct extends Construct { retryOnServiceExceptions: true, })) .next(new LambdaInvoke(this, 'UpdateAllegrisFeedTask', { - lambdaFunction: props.cronLambda_2G, + lambdaFunction: props.cronLambda_4G, payload: TaskInput.fromObject({ 'action': 'update_allegris_feed', 'params': { @@ -152,7 +152,7 @@ export class SfnConstruct extends Construct { retryOnServiceExceptions: true, })) .next(new LambdaInvoke(this, 'UpdateMetadataTask', { - lambdaFunction: props.cronLambda_2G, + lambdaFunction: props.cronLambda_4G, payload: TaskInput.fromObject({ 'action': 'update_metadata', 'params': { diff --git a/cdk/lib/stacks/cron-stack.ts b/cdk/lib/stacks/cron-stack.ts index 944916c..cf5baee 100644 --- a/cdk/lib/stacks/cron-stack.ts +++ b/cdk/lib/stacks/cron-stack.ts @@ -23,7 +23,7 @@ export class CronStack extends cdk.Stack { const sfn = new SfnConstruct(this, 'SFN', { dataBucket: props.dataBucket, cronLambda_1G: cronLambda.lambda_1G, - cronLambda_2G: cronLambda.lambda_2G, + cronLambda_4G: cronLambda.lambda_4G, webhookUrl: cdk.SecretValue.cfnParameter(new cdk.CfnParameter(this, 'webhookUrl', { type: 'String', noEcho: true,