Closed michael-kutsch closed 11 months ago
@DrFunk-n-stein I thought of adding this configuration option before. Just like with #50, it will also be really natural to provide such a configuration in a CDK construct or a Terraform module.
Could you please describe your current Basti usage?
@BohdanPetryshyn yup, this will make a lot of sense in an IaC context. I was not referring to a performance issue, rather than compliance/cost saving requirements in bigger setups. I'm a SecDevOps consultant and am setting up also landing zones and cost saving measures, therefore I've seen such setups several times: multi-account, several bastion hosts lying around, accumulating costs at scale.
Therefore, it could make sense to use different instance families (e.g. t3, t3a, t4g, or whatever someone is using)
Because most CDK constructs that use ec2 under the hood already allow for this functionality. This is already added to the CDK construct. But it is certainly good that people will be using this.
t2.micro is not available in my region (af-south-1) and so I am not able to use basti
here is the error I get:
Error setting up bastion. Can't create bastion EC2 instance. Unexpected error: The requested configuration is currently not supported. Please check the documentation for supported configurations.. This operation might have already created AWS resources. Please, run `basti cleanup` before retrying
It would be great if the instance type was configurable. I'd like to use t3.micro
@ACronje, thank you for reporting this! I will introduce this configuration by the end of the next week when I return from my vacation.
Hey @DrFunk-n-stein and @ACronje 👋
I'm happy to let you know that the ability to select the EC2 instance type was introduced in v1.4.0
!
Feature Description
Currently, t2.micro is the default instance family and size that cannot be changed. This is fine for smaller setups that e.g. can benefit from the AWS free tier.
Adding the optional setting to change the instance family and size would be great to match an organizations requirements.
Use Case
For bigger setups at scale, it's a best practice to use either reserved instances or cost savings plans that may be limited to certain EC2 instance families.
If this is the case,
basti
instances would be charged at on demand pricing and would not benefit from existing cost saving measures.Proposed Solution
Optionally setting the instance family and instance size as parameter in the CLI or in the config file.
Related Issues/PRs
-