On AWS, Infrastructure As SQL Is Now Open Source And Available As A Service

0
668
FILE PHOTO: The logo of Amazon Web Services (AWS) is seen during the 4th annual America Digital Latin American Congress of Business and Technology in Santiago, Chile, September 5, 2018. REUTERS/Ivan Alvarado/File photo

IaSQL, the firm behind a service that uses SQL to model AWS infrastructure, recently announced that IaSQL is now open source and available as software as a service. IaSQL provides a two-way connection between an AWS account and a hosted PostgreSQL database to describe an AWS deployment by mapping cloud APIs into SQL tables. Co-founder and CEO LuisFer De Pombo explains:

“Infrastructure as Code solutions do not have a good way of encoding dependencies across infrastructure pieces in a micro services architecture which makes it really hard to make and revert changes to infrastructure. Representing your infrastructure as SQL resolves the primary issue of YAML-based infrastructure tools by making the relations between pieces of your infrastructure first-class citizens.”

The service may be configured to manage existing deployments by connecting an AWS account to an IaSQL instance, populating the database with operating cloud resources, and defining and limiting services using a module system that maps every IaSQL module to an AWS service, such as aws ec2 or aws elb.

IaSQL isn’t the only SQL-based solution attempting to query and control cloud infrastructure. CloudQuery, an open source cloud asset inventory, Steampipe, a Turbot open source project, trino-cloud, a Trino connectors for managing cloud resources, and StackQL are some other choices. De Pombo offers an example of the advantages of using SQL:

“You can’t set the EC2 instance type as “t2.mucro” and have your deploy system try and fail to create such an instance. The insert statement will fail and tell you zero rows were inserted and you can quickly see why.”

The article shows as well different examples of SQL statement to manage EC2 instances, for example to create a new one running on the latest Amazon Linux AMI:

INSERT INTO aws_ec2 (ami_id, ec2_instance_type_id)

SELECT ami.id, ait.id

FROM ec2_instance_type as ait, (

SELECT id

FROM   amis

WHERE  image_name LIKE ‘amzn-ami-hvm-%’ORDER BY creation_date DESC

LIMIT 1

) as ami

WHERE  ait.instance_name = ‘t2.micro’;

One of the ostensible advantages of SQL is that it is already widely used in most technical teams, thus cloud engineers will not have to learn a new language to manage infrastructure. In a Hacker News conversation, user nucatus writes:

“While there is a point in representing the state of the infrastructure as SQL to enforce type safety and other constraints, I still don’t understand what are the real advantages over the current tooling. All the key advantages listed there, including type safety and cloud providers defined constraints, are already well covered by the actual battle-tested tools and frameworks.”

One of the advantages of using a PostgreSQL instance as a repository, according to the developers, is the ability to totally replace the live IaSQL database with an earlier snapshot on AWS, reverting the entire deployment to a previous state.

Only a subset of AWS services are supported in this release: EC2, Elastic Container Register (ECR), ECS + Fargate, ELB, RDS, VPC, and IAM. In the future, IaSQL intends to support GCP, Azure, and other cloud providers. The repository is hosted on GitHub, and there is also a Discord channel.

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here