/site/images/avatar.png

Switching between multiple AWS accounts and roles

Working with multiple AWS accounts is common in modern cloud environments, especially when following multi-account strategies for security, compliance, or environment separation (e.g., dev, staging, prod).

However, switching between these accounts in the AWS CLI can quickly become painful if you rely only on raw profiles. Fortunately, there are tools and tricks that make account switching much more convenient and efficient.

AWS Spot interruption stats for CI/CD

Amazon EC2 provides access to spare EC2 compute capacity in the AWS Cloud through Spot Instances at savings of up to 90% compared to On-Demand prices. The only difference between On-Demand Instances and Spot Instances is that Spot Instances can be interrupted by Amazon EC2, with two minutes of notice, if Amazon EC2 needs to reclaim the capacity.

Gitlab runner on macOS

There are multiple ways to use gitlab executor on macOS hosts, but two main are:

  • Shell executor
  • SSH executor

Despite some serious disadvantages of ssh executor it keeps all configs centralized (e.g. in kubernetes configmap), opposite to Shell executor that holds config on runner (local filesystem).