Repository navigation
Security Group Id: sg-12345 not found #21485
Unanswered
Ichimokuzero
asked this question in
Q&A
Replies: 3 comments
|
I'm guessing it's related to this dummy SG value in CDK. You may have a dependency issue and need to make some resource dependent on the security group in question so that the security group ID can be resolved. |
0 replies
|
Method Can you please describe your use case so we can see which of those methods is correct? Can you share the code for a minimum example where the issue occurs? (using |
0 replies
|
You can use |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I was trying to import an existing Security Group in CDK by using SecurityGroup.fromSecurityGroupId method and it failed with the following error:
Security Group Id: sg-12345 not found! (Service: AmazonEC2; Status Code: 400; Error Code: InvalidGroup.NotFound; Request ID: 8e2cd924-075d-4c64-b5ba-2e1d9c72fe95; Proxy: null)
Below is my CDK code:
const sg = SecurityGroup.fromSecurityGroupId(this, 'sgFromLookUp', 'sg-084c533df9d662439');
I double checked that the security group id is correct, I also tried the other 2 methods for security group look up:
SecurityGroup.fromLookupById()
SecurityGroup.fromLookupByName()
All of them returned the same error, any ideas why?
All reactions