I couldn't create EC2, why is that?
See original GitHub issueHi guys, Here’s the create_instance.py file i used to create EC2 Instance.
#!/usr/bin/python
import boto3
ec2 = boto3.resource('ec2')
ec2.create_instances(ImageId='ami-fe5b6790', MinCount=1, MaxCount=1)
but when i was executing it, i got this error:
Traceback (most recent call last):
File "create_instance.py", line 4, in <module>
ec2.create_instances(ImageId='ami-fe5b6790', MinCount=1, MaxCount=1)
File "/usr/local/lib/python2.7/dist-packages/boto3/resources/factory.py", line 518, in do_action
response = action(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/boto3/resources/action.py", line 83, in __call__
response = getattr(parent.meta.client, operation_name)(**params)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 258, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 548, in _make_api_call
raise ClientError(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (InvalidParameterCombination) when calling the RunInstances operation: Non-Windows instances with a virtualization type of 'hvm' are currently not supported for this instance type.
I noticed that type “hvm” are currently not supported, so what should i do?
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Troubleshoot issues when starting or launching an EC2 instance
1. The specified instance type isn't supported in the requested Availability Zone. Run the aws ec2 describe-instance-type-offerings command in ...
Read more >Why can't I connect to an Amazon EC2 instance ... - YouTube
We appreciate your feedback: https://amazonintna.qualtrics.com/jfe/form/SV_1FXsYFfkTDc1OQKSkip directly to the demo: 0:24For more details ...
Read more >AWS EC2 can't change instance type - greyed out or disabled ...
Your instance is running. Solution: Stop your instance (Don't terminate). Then Actions button -> Instance settings -> Change instance type.
Read more >Fixing an AWS EC2 Instance Boot Up Issue - Home - Clairvoyant
Setup · Make sure that its in the same Region and Availability Zone of the machine you detached the root volume from. Volumes...
Read more >couldn't setup sftp in ec2 - Server Fault
couldn't setup sftp in ec2 · Launched a new EC2 instance · Logged in as ec2-user · Installed vsftpd · Updated security group...
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 FreeTop 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
Top GitHub Comments
You pass that in with the
InstanceType
parameter (docs).@thinhduckhoi : Yes, that part of documentation actually outdated. After AWS enforce the use of VPC, you NEED VPC.
In fact, the minimum requirement to launched a EC2 instance into VPC(e.g. your final script) , is first create a VPC. Just use AWS web console create a basic VPC. Then launch your create_instance() that will use all default VPC value filled up the rest.