Skip to content

Instantly share code, notes, and snippets.

RFC - Ruby Language Bindings

  • Original Author(s):: @omarqureshi
  • Tracking Issue: aws/jsii#5129
  • API Bar Raiser: @{BAR_RAISER_USER}

This RFC proposes the introduction of native Ruby language bindings for the AWS Cloud Development Kit (CDK).

The Problem

@omarqureshi
omarqureshi / 1-aws-cdk.diff
Last active May 22, 2026 13:29
Example of synth output from `cdk synth` when writing CDK in Ruby
diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json
index 8420c94bc5..bdd75dd017 100644
--- a/packages/aws-cdk-lib/package.json
+++ b/packages/aws-cdk-lib/package.json
@@ -66,6 +66,10 @@
"tsconfig": "tsconfig.json",
"outdir": "dist",
"targets": {
+ "ruby": {
+ "gem": "aws-cdk-lib",
# Generated from jsii-pacmak from calculator.ts
require 'jsii'
class Calculator < Jsii::Object
self.jsii_fqn = "minimal-test.Calculator"
def add(a, b)
jsii_call_method("add", [a, b])
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@omarqureshi
omarqureshi / 7.rb
Last active December 9, 2018 22:41
steps = Hash.new([])
File.open("./input.txt") do |file|
file.each_line do |line|
line =~ /Step ([A-Z]) must be finished before step ([A-Z])/
step = $2
prereq = $1
steps[prereq] = [] unless steps.has_key?(prereq)
steps[step] += [prereq]
end
version: '3'
services:
haproxy:
image: haproxy:1.5
volumes:
- /path/to/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
ports:
- "80:80"
require "minitest/autorun"
class Potter
attr_accessor :items
PRICE_PER_BOOK = 8
def initialize(items)
@items = items.sort
@current_value = items.first
# config file for ansible -- http://ansible.com/
# ==============================================
# nearly all parameters can be overridden in ansible-playbook
# or with command line flags. ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory or /etc/ansible/ansible.cfg, whichever it
# finds first
[defaults]
{
"network":{
"network_id": 5
},
"branch":{
"branch_id": 1566,
"channel": 1,
"overseas": false
},
"property":{