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

Add VPC support for aws-lambda-dynamodb #148

Closed
1 of 2 tasks
danielmatuki opened this issue Mar 16, 2021 · 2 comments
Closed
1 of 2 tasks

Add VPC support for aws-lambda-dynamodb #148

danielmatuki opened this issue Mar 16, 2021 · 2 comments
Labels
feature-request A feature should be added or improved needs-triage The issue or PR still needs to be triaged

Comments

@danielmatuki
Copy link
Contributor

Update the aws-lambda-dynamodb construct to allow providing VPC configurations for the Lambda Function.

Use Case

This will allow the Lambda Functions deployed by this pattern to access resources in a VPC.

Proposed Solution

Following the changes made to aws-lambda-sqs include the following VPC properties:

Pattern Construct Props

Name Type Description
existingVpc? ec2.IVpc An optional, existing VPC into which this pattern should be deployed. When deployed in a VPC, the Lambda function will use ENIs in the VPC to access network resources and an Interface Endpoint will be created in the VPC for Amazon SQS. If an existing VPC is provided, the deployVpc property cannot be true. This uses ec2.IVpc to allow clients to supply VPCs that exist outside the stack using the ec2.Vpc.fromLookup() method.
vpcProps? ec2.VpcProps Optional user-provided properties to override the default properties for the new VPC. enableDnsHostnames, enableDnsSupport, natGateways and subnetConfiguration are set by the pattern, so any values for those properties supplied here will be overrriden. If deployVpc is not true then this property will be ignored.
deployVpc? boolean Whether to create a new VPC based on vpcProps into which to deploy this pattern. Setting this to true will deploy the minimal, most private VPC to run the pattern:
  • One isolated subnet in each Availability Zone used by the CDK program
  • enableDnsHostnames and enableDnsSupport will both be set to true
If this property is true then existingVpc cannot be specified. Defaults to false.

Pattern Properties

Name Type Description
vpc? ec2.IVpc Returns an interface on the VPC used by the pattern (if any). This may be a VPC created by the pattern or the VPC supplied to the pattern constructor.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request
\

@danielmatuki danielmatuki added feature-request A feature should be added or improved needs-triage The issue or PR still needs to be triaged labels Mar 16, 2021
@biffgaut
Copy link
Contributor

Looks good - go ahead

@biffgaut
Copy link
Contributor

Released in 1.98.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved needs-triage The issue or PR still needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants