-
Notifications
You must be signed in to change notification settings - Fork 3
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
Can't run new EC2 instance with providing NetworkInterfaces #16
Comments
This is probably relevant for a second item: https://github.com/boto/botocore/blob/c920c8f40c6fb61b9b3f3b1d76ff3c14fdad3490/botocore/serialize.py#L319 |
So you mean: Currently: Expected: Refs:
|
Hey, thanks for the issue! Ec2 is a pretty weird API out of the bunch. If you could include an awscli or /x/aws_api etc. invocation that you expect to work, I should be able to compare the payloads sometime today. |
Following up more directly:
|
Oh dear, the I'll be able to work on this one point on my own but in the meantime try adding an action filter to your import. For example, my import { EC2, Instance } from 'https://aws-api.deno.dev/v0.2/services/ec2.ts?actions=RunInstances,DescribeInstances,DescribeAvailabilityZones,DescribeVpcs,DescribeSubnets,DescribeImages,TerminateInstances,GetConsoleOutput'; |
The way we populate lists from XML means that you'll always get an array, even if it's empty.
Hi, I've pushed a codegen fix efd6d33 which addresses a few different issues in the EC2 API, including point 2 in your original message. It turns out my list encoding handled EC2's special-case wrongly, and the aws-sdk-js test fixtures didn't stress that aspect. These changes impact only the request payloads. I've already applied it to both published codegen versions (v0.1 & v0.2) since the change is strictly fixing things and only in I also updated my EC2 demo to use For the most accurate typings, remember to import only the actions you need, as I showed in my previous comment. That issue is still not resolved. EC2 is weird, so if you end up looping back to using this module, I'd love to hear how it goes, successful or not. Thanks! |
The reported issues here should be resolved in the upcoming codegeneration This brief sample now runs for me: import { ApiFactory } from 'https://deno.land/x/aws_api/client/mod.ts';
import { EC2 } from 'https://aws-api.deno.dev/v0.3/services/ec2.ts';
const ec2 = new ApiFactory().makeNew(EC2);
const {Instances: [instance]} = await ec2.runInstances({
"MinCount": 1,
"MaxCount": 1,
"InstanceType": "t4g.nano",
"ImageId": "ami-0e8eba75fce52c37c", // replace this
"NetworkInterfaces": [{
"DeviceIndex": 0,
"AssociatePublicIpAddress": true,
"SubnetId": "subnet-506cd939" // replace this
}],
}); I'll be promoting v0.3 to default soon, in sync with releasing v0.6.0 of the client library. I look forward to hearing how your usecase goes. :) |
InstanceNetworkInterfaceSpecification
is slightly incorrect comparing to https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html. Fields such asIpv4Prefixes
,Ivp4Addresses
are optional according to documentation.Groups
are actually spelledGroupSet
.runInstnaces
withNetworkInterfaces
supplied in request lead to exception from AWSThe text was updated successfully, but these errors were encountered: