Incorrect/incomplete EC2 DescribeVpcEndpointServicesResponse
See original GitHub issueLast year the code for describe_vpc_endpoint_services
was committed, but the implementation markdown file wasn’t updated to mark this API as implemented. I assume that’s because the code is incomplete? I do know that the response for this API doesn’t match what I’m seeing from AWS.
moto’s response to this API:
<DescribeVpcEndpointServicesResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
<requestId>19a9ff46-7df6-49b8-9726-3df27527089d</requestId>
<serviceNameSet/>
<serviceDetailSet/>
</DescribeVpcEndpointServicesResponse>
AWS’s response to this API:
<DescribeVpcEndpointServicesResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
<requestId>95501499-94d6-44fa-bf6c-cd556b0acd36</requestId>
<serviceDetailSet>
<item>
<acceptanceRequired>false</acceptanceRequired>
<availabilityZoneSet>
<item>us-east-1a</item>
<item>us-east-1b</item>
<item>us-east-1c</item>
<item>us-east-1d</item>
<item>us-east-1e</item>
<item>us-east-1f</item>
</availabilityZoneSet>
<baseEndpointDnsNameSet>
<item>config.us-east-1.vpce.amazonaws.com</item>
</baseEndpointDnsNameSet>
<managesVpcEndpoints>false</managesVpcEndpoints>
<owner>amazon</owner>
<privateDnsName>config.us-east-1.amazonaws.com</privateDnsName>
<privateDnsNameVerificationState>verified</privateDnsNameVerificationState>
<privateDnsNameSet>
<item>
<privateDnsName>config.us-east-1.amazonaws.com</privateDnsName>
</item>
</privateDnsNameSet>
<serviceId>vpce-svc-xxxxxxxxxxxx</serviceId>
<serviceName>com.amazonaws.us-east-1.config</serviceName>
<serviceType>
<item>
<serviceType>Interface</serviceType>
</item>
</serviceType>
<tagSet/>
<vpcEndpointPolicySupported>true</vpcEndpointPolicySupported>
</item>
</serviceDetailSet>
<serviceNameSet>
<item>com.amazonaws.us-east-1.config</item>
</serviceNameSet>
</DescribeVpcEndpointServicesResponse>
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
describe-vpc-endpoint-services - AWS Documentation
Describes available services to which you can create a VPC endpoint. When the service provider and the consumer have different accounts in multiple ......
Read more >describe-vpc-endpoint-services - Amazon AWS
Describes available services to which you can create a VPC endpoint. When the service provider and the consumer have different accounts in multiple...
Read more >LocalStack: VPC end-point API is not working #2650 - GitHub
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error...
Read more >API Gateway cares about my Authorization header when it ...
The endpoint (as well as the rest of the VPC infrastructure) is ... This is the policy returned when calling aws ec2 describe-vpc-endpoints...
Read more >Associate (SOA-C02) Exam Guide - Awsstatic
The AWS Certified SysOps Administrator – Associate (SOA-C02) exam is intended ... Multiple choice: Has one correct response and three incorrect responses.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the investigation @kbalk. That sounds like a good approach overall. Two minor points:
The MotoAPI should really be reserved for operations that are specific to Moto, independent of AWS. So the method is a good idea, but this may be better placed somewhere else - maybe just part of
VPCBackend
? Alternatively just a separate service/utility class, to ensure that this logic is independent (and independently testable) from other EC2 logic.Generating this list once could lead to a bug where people use context managers:
Granted, it’s an edge use case - but it would lead to unexpected behaviour, which is never good. I don’t imagine generating the list would take that long anyway, so let’s just regenerate every time. We can revisit that assumption if it turns out to be too optimistic.
What do you mean by ‘run through’? I meant that
get_vpc_endpoint_services
would return the default services (appropriately filtered ofcourse).