Skip to content

Commit

Permalink
Enabling SG passthrough for SingletonFunction
Browse files Browse the repository at this point in the history
  • Loading branch information
drduhe committed Sep 30, 2023
1 parent bbef707 commit c04e456
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ export interface ECRDeploymentProps {
*/
readonly vpcSubnets?: ec2.SubnetSelection;

/**
* The list of security groups to associate with the Lambda's network interfaces.
*
* Only used if 'vpc' is supplied.
*
* @default - If the function is placed within a VPC and a security group is
* not specified, either by this or securityGroup prop, a dedicated security
* group will be created for this function.
*/
readonly securityGroups?: ec2.SecurityGroup[];

/**
* The environment variable to set
*/
Expand Down Expand Up @@ -138,6 +149,7 @@ export class ECRDeployment extends Construct {
memorySize: memoryLimit,
vpc: props.vpc,
vpcSubnets: props.vpcSubnets,
securityGroups: props.securityGroups,
});

const handlerRole = this.handler.role;
Expand Down

0 comments on commit c04e456

Please sign in to comment.