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

VPC lookup function is not configured properly #1

Open
Jeevan-J opened this issue May 25, 2024 · 0 comments
Open

VPC lookup function is not configured properly #1

Jeevan-J opened this issue May 25, 2024 · 0 comments

Comments

@Jeevan-J
Copy link

While running cdk bootstrap, the default VPC ID and VPC CIDR are shown in the logs.

> cdk bootstrap
VPC ID: vpc-12345
VPC CIDR: 1.2.3.4/5
[]
Ports: 1024,1025,1026
Security Group ID: ${Token[TOKEN.21]}
Load Balancer ARN: ${Token[TOKEN.34]}
VPC Endpoint IPs: 10.0.0.7
Listener ARN for port 1024: ${Token[TOKEN.38]}
IP Targets for port 1024: [{"ipAddress":"10.0.0.7","port":1024}]
Listener ARN for port 1025: ${Token[TOKEN.57]}
IP Targets for port 1025: [{"ipAddress":"10.0.0.7","port":1025}]
Listener ARN for port 1026: ${Token[TOKEN.76]}
IP Targets for port 1026: [{"ipAddress":"10.0.0.7","port":1026}]

After debugging, I found that the following line lib\mongodb_atlas_as_aws_bedrock_knowledge_base-stack.ts is not configured properly as per CDK Lib docs

const vpc = ec2.Vpc.fromLookup(this, vpcId, { isDefault: false });`

This line has to be modified as the following to make this work.

const vpc = ec2.Vpc.fromLookup(this, 'Vpc', { isDefault: false, vpcId: vpcId });`

Basically this filters the VPC using VPC ID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant