-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Implement EC2 support through Moto #1363
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
Conversation
Thanks for this PR @brettneese ! Looks like we still have a compilation error in the Java libs? (see travis build logs) |
@whummer Weird, didn't have that problem locally, but now that this is merged I can look at it more today. localstack/localstack-python-client#15 |
@whummer fixed the CI issues, but now the build is just kinda hanging on at the end. Any idea why that might be? |
Oops, I take that back, looks like it's still doing things, haha. |
Great, thanks for the quick turnaround @brettneese . |
How is this supposed to work? I am unable to mock an ec2 instance. I'm using Terraform pointing the ec2 endpoint to localhost on port 4597. Any clue or example? Thank you |
I'm not sure why you'd be pointing Terraform at localstack, but an example is here: Note that Moto may not support all endpoints, which may trip up Terraform. Nor does it actually create real instances of any kind. You can see the currently supported endpoints here: http://docs.getmoto.org/en/latest/index.html I can verify that the endpoints mentioned worked as I'm already using it across multiple projects via the nodejs AWS SDK. |
Thank you for your reply. Well I'm pointing Terraform to localstack because I want to run mock ec2 instances locally and deploy docker containers onto them, using Terraform rather than issuing aws cli commands or writing Python code, primarily for convenience. Thanks for clarifying: I was under the impression that I could create mock ec2 instances of some sort (maybe as docker containers...) and deploy containers onto them (that was my plan given that localstack does not support ecs yet) You are right, I figured it out after playing around with Moto: it looks like Moto does not support the all the AWS endpoints, therefore the Terraform script doesn't work at least when it comes to create ec2 instances. It's a shame because other services work fine: I will have to rely on a combination of Terraform + localstack + ecs-cli to be able to run containers locally. |
This adds basic EC2 support using the prexisting Moto implementation.
It needs an update to the client to pass through the proper port, although I've already bumped the requirements.txt version and submitted a PR - see here.
Open to any input! :)
Closes #691