Skip to content

Commit

Permalink
Fix finding Gateway VPC Endpoints by id
Browse files Browse the repository at this point in the history
For approximately the last month, the AWS `describe_vpc_endpoints` API
has been broken when fetching _Gateway_ VPC endpoints by id using the
`filters` option.

Using the `vpc_endpoint_ids` option instead does still work, (for both
Interface and Gateway endpoints).

Fixes #594
  • Loading branch information
alexjfisher committed Jan 16, 2025
1 parent 7c19ade commit 5352234
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/awspec/helper/finder/vpc_endpoints.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ module Awspec::Helper
module Finder
module VpcEndpoints
def find_vpc_endpoint(id)
res = ec2_client.describe_vpc_endpoints({
filters: [{ name: 'vpc-endpoint-id', values: [id] }]
})
res = ec2_client.describe_vpc_endpoints({ vpc_endpoint_ids: [id] })

ret = res.vpc_endpoints.select do |vpce|
vpce.vpc_endpoint_id == id
Expand Down

0 comments on commit 5352234

Please sign in to comment.