Delete VPC Connection permanently

Hi QuickSight Community,

I would like to be able to permanently delete a VPC connection and re-use the vpcConnection ID to connect to a different VPC.

When I delete a VPC Connection via the UI or the AWS CLI, it goes into a “DELETED” status, but the ID is still in use.

Is there a way to permanently get rid of the VPC Connection and re-use the ID?

As an example, the start_asset_bundle_import_job has a ROLLBACK failure action that removes all the VPCs it creates. How is that possible if delete-vpc-connection still leaves the ID in use?

Thanks,
Adrian

Hey @Adrian_Vacaru - I understand wanting to permanently delete the VPC Connection. What’s the need for re-using the same connection id?

1 Like

@eperts the reason for re-using the same id is automation. I have an automated script that imports an assets bundle with a prefix for all resources.

Now the issue is that I have multiple VPCs in my account, and by mistake I created a VPC connection to the wrong VPC, but the prefix in the ID references another one. That’s why I’d like to be able to remove the VPC connection permanently.

By the way, I noticed that the VPC connection disappears after an arbitrary amount of time (couldn’t find the value in the docs) after its status is set to DELETED, but I’d like to be able to make it disappear instantly. Something similar to delete-analysis --force-delete-without-recovery.

Hi @Adrian_Vacaru - This is a good observation and we can request QuickSight team to understand why the VPC connection deletion is taking time and is there any API available to delete the VPC connection or not. Since the problem is resolved, you can mark your suggestion as solution.

Hi @eperts - Is it possible to check this internally and advise us.

Regards - Sanjeeb

1 Like

@Adrian_Vacaru - My understanding is that the CLI command which creates the VPC connection ie aws quicksight create-vpc-connection is a wrapper of the EC2 API that create NetworkInterfaces.

If you look here the permissions needed are all EC2 related. The reason I point this out is because we are using the AWS CLI to perform a QuickSight action, but it’s essentially a networking one.

Now, when an ENI is up for deletion it needs to be detached first (check here). The QuickSight VPCConnection deletion will take care of that but the whole operation takes time and it’s kind of unknown.

I’ll have to do some digging on the VPCConnection Id. The answer may be that the API needs to be updated to allow you to specify an ID. If one is not provided it will be automatically populated.

1 Like