best-receptionist-98400
05/22/2020, 1:19 PMdependsOn
the step above to waitForFulfillment
that imports the resulting Ec2 instance in to the stack so I can modify it
• Update the Ec2 Instance I just imported to add the necessary tags
• another step that dependsOn
the tags being added that then goes to attach this instance to the load balancer?
Or alternatively:
• Use the SpotFleetRequest to be able to set the Tags and Load Balancer
• Another step that dependsOn
the step above to waitForFulfillment
that imports the resulting Ec2 instance in to the stack so I can modify it
• Update the Ec2 Instance I just imported to have a different NetworkInterfaceId and specific PrivateIP
I'm just wondering if I'm missing anything here, or if that is the way I would need to go about this. Thanks.white-balloon-205
Tags - Only on SpotFleetRequest.LaunchConfig. I know you can set tags on the SpotInstanceRequest but those apply only to the request, not the resulting Ec2 Instance but appears to be a limitation of AWS for some reason.Yeah - this appears to be an (unfortunate) AWS limitation.
LoanBalancers, NetworkInterfaces, PrivateIPI think these differences are really about single instance vs. multiple instances. Which scenario are you trying to accomplish? I think your high-order-bit would likely to be to align to which of those matches what you want.
imports the resulting Ec2 instance in to the stack so I can modify itThat could work. Alternatively, if tagging is the thing you want to update, you could just wait for availability and then call
create-tags
yourself using the AWS SDK. Along the lines of https://gist.github.com/lukehoban/fd0355ed5b82386bd89c0ffe2a3c916a#file-waitforjob-ts-L20.best-receptionist-98400
05/26/2020, 2:18 PMMyStack
class after it's done running? Do you know of any C# examples that show something like that? I was looking around on how to invoke the isDryRun
in C# but couldn't find anything.IsDryRun
, but I'm still having trouble with the "waiting" part. I haven't been able to get the SpotInstanceId from the SpotInstanceRequest yet.