-
Notifications
You must be signed in to change notification settings - Fork 4k
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
ec2: Cannot configure 'securityGroups' without configuring a VPC #28572
Comments
Can you share code snippets for that? |
Yes kindly refer below code that was using with aws cdk v1 with @aws-cdk/aws-lambda package and aws cdk v2 with aws-cdk-lib/aws-lambda package,
|
This error generate indicates you can't just specify security groups with Please check this doc string: aws-cdk/packages/aws-cdk-lib/aws-lambda/lib/function-base.ts Lines 199 to 205 in 79c7796
|
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Status
Investigating (Default)
What is the issue?
I have migrated my CDK code from CDK V1 to CDK V2 and installed the aws-cdk-lib package and made the changes into the files for imports.
Now, I am synthesizing my stack with cdk synth command and my stack is failed with Cannot configure 'securityGroups' without configuring a VPC error message.
Earlier with AWS CDK V1, I was not getting this type of bug, but it is started after the CDK V2 migration.
Error message
Cannot configure 'securityGroups' without configuring a VPC
What is the impact?
Earlier with AWS CDK V1 @aws-cdk package this issue was not coming but when code is migrated to aws-cdk-lib this issue has been started.
Actually , we are creating the lambda Cloudwatch logs for which we are putting it in security group but we do not want to assign VPC to it.
Workaround
No response
Who is affected?
Our entire CDK stack is impacted due to this and we are not able to migrate our code from AWS CDK V1 to AWS CDK V2 version.
How do I resolve this?
TBD
Related issues
No response
The text was updated successfully, but these errors were encountered: