EC2 InstanceType Setting

Hello, I recently converted my trial to the Pro version. I have confirmed the pro version is being used:
curl -s http://localhost:4566/_localstack/info output:
{“version”: “3.1.1.dev20240202102022:afd012e”, “edition”: “pro”, “is_license_activated”: true, , … “system”: “linux”, “is_docker”: true, “server_time_utc”: “2024-02-22T18:48:47”, “uptime”: 2894}

I am using python / boto3 to create an ec2 instance of instance type ‘t3.nano’ , using the “run_instances()” function. That works fine and when I ssh into the new instance I noticed that the number of cpu’s ( cat /proc/cpuinfo ) reflects the number of cpu’s on my host. Same for memoy, as well as storage.

The documentation indicates that there is a “Mock” implementation for community and a “Pro” implementation, but I do not understand what that means.

Is there a way to create an EC2 instance with the limits specified for the InstanceType?
Thank you,

Hi @ioannisthemistocles, LocalStack Pro uses Docker to emulate EC2 instances. Every launched instance is in fact a Docker container. Because of how containerisation works, many of host machines’s properties are also shared by the containers, including the CPU and memory capacity and limits.

The instance type is currently only a cosmetic value that does not have any effect on these Dockerised instances. Only the API operations e.g. DescribeInstanceswill return the value that was originally provided to RunInstances.

The difference between mocking and emulation is that related my previous statement. In mocking, the API operations will simply return responses. There will be no underlying resource that you can interact with. With emulation, we actually emulate the underlying resource i.e. an EC2 instance you can SSH into, or a DynamoDB table that works like an actual database table. Please see this section in our documentation.

I hope this answers your question!