Skip to content

Commit

Permalink
Added ability to change the Architecture of the Lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGoatedDev committed Oct 6, 2023
1 parent c6b1a4b commit 7cd89f3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import * as child_process from 'child_process';
import * as path from 'path';
import { aws_ec2 as ec2, aws_iam as iam, aws_lambda as lambda, Duration, CustomResource, Token } from 'aws-cdk-lib';
import { PolicyStatement, AddToPrincipalPolicyResult } from 'aws-cdk-lib/aws-iam';
import { CustomResource, Duration, Token, aws_ec2 as ec2, aws_iam as iam, aws_lambda as lambda } from 'aws-cdk-lib';
import { AddToPrincipalPolicyResult, PolicyStatement } from 'aws-cdk-lib/aws-iam';
import { Construct } from 'constructs';
import { shouldUsePrebuiltLambda } from './config';

Expand Down Expand Up @@ -79,6 +79,12 @@ export interface ECRDeploymentProps {
* The environment variable to set
*/
readonly environment?: { [key: string]: string };

/**
* The Architecture that the Lambda will be ran on
*/
readonly architecture?: lambda.Architecture;

}

export interface IImageName {
Expand Down Expand Up @@ -150,6 +156,7 @@ export class ECRDeployment extends Construct {
vpc: props.vpc,
vpcSubnets: props.vpcSubnets,
securityGroups: props.securityGroups,
architecture: props.architecture,
});

const handlerRole = this.handler.role;
Expand Down

0 comments on commit 7cd89f3

Please sign in to comment.