{"id":13880920,"url":"https://github.com/customink/lamby-rds-proxy","last_synced_at":"2025-07-16T17:31:19.866Z","repository":{"id":65720856,"uuid":"284267757","full_name":"customink/lamby-rds-proxy","owner":"customink","description":"🦎♻️ Simple RDS Proxy Tutorial for Rails \u0026 Lambda","archived":true,"fork":false,"pushed_at":"2020-08-02T02:38:25.000Z","size":35,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-07-11T06:46:53.322Z","etag":null,"topics":["aws-lambda","aws-sam","aws-sam-cli","cdk","fullstack-serverless","lambda","rails","rds","rds-proxy","ruby-on-rails"],"latest_commit_sha":null,"homepage":"https://lamby.custominktech.com/docs/database_connections","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/customink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-01T13:43:02.000Z","updated_at":"2024-01-16T14:24:43.000Z","dependencies_parsed_at":"2023-02-06T15:25:11.217Z","dependency_job_id":null,"html_url":"https://github.com/customink/lamby-rds-proxy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/customink/lamby-rds-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/customink%2Flamby-rds-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/customink%2Flamby-rds-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/customink%2Flamby-rds-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/customink%2Flamby-rds-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/customink","download_url":"https://codeload.github.com/customink/lamby-rds-proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/customink%2Flamby-rds-proxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265527547,"owners_count":23782480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-lambda","aws-sam","aws-sam-cli","cdk","fullstack-serverless","lambda","rails","rds","rds-proxy","ruby-on-rails"],"created_at":"2024-08-06T08:03:39.565Z","updated_at":"2025-07-16T17:31:19.560Z","avatar_url":"https://github.com/customink.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# My CDK RDS Proxy\n\n\u003ca href=\"https://github.com/customink/lamby\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/2381/59363668-89edeb80-8d03-11e9-9985-2ce14361b7e3.png\" alt=\"Lamby: Simple Rails \u0026 AWS Lambda Integration using Rack.\" align=\"right\" width=\"300\" /\u003e\u003c/a\u003eLovingly copied from [CDK Patterns](https://cdkpatterns.com) from their [RDS Proxy](https://github.com/cdk-patterns/serverless/tree/master/the-rds-proxy/typescript) section for learning how to use [Lamby with Database Connections](https://lamby.custominktech.com/docs/database_connections). Includes the following changes:\n\n- Usage of Docker to encapsulate the project.\n- Removed API Gateway \u0026 Lambda resources.\n- Pass your VPC ID via the `VPC_ID` environment variable.\n\n⚠️WARNING⚠️ Pay attention to your AWS bill. These resources are not free. Also, these resources are provided for easy use and learning purposes and do not follow many security best practices. For example, we recommend changing:\n\n- Changing the subnets from `PUBLIC` to `PRIVATE`.\n- Locking down the security groups.\n- Create distinct root and user accounts.\n- Use a SecureString type in SSM.\n\n## Bootstrap \u0026 Setup\n\nAll that is needed is Docker and your AWS account setup. This will install the Docker container and run `npm setup`.\n\n```shell\n$ ./bin/bootstrap\n$ ./bin/setup\n```\n\n## Deploy Your RDS Proxy\n\nPlease export the `VPC_ID` variable. Most AWS accounts have a default VPC and the ID can be found by navigating to Services -\u003e VPC within the AWS Console. If needed, you can create a new VPC using this [My CDK VPC](https://github.com/customink/lamby-vpc) project.\n\nOptionally, you can export or pass an `AWS_PROFILE` (defaults to \"default\") environment variable. This will automatically set the `CDK_DEFAULT_ACCOUNT` value. Likewise, you can pass or export `AWS_DEFAULT_REGION` (defaults to us-east-1) too.\n\n```shell\n$ DB_NAME=myapp VPC_ID=vpc-01a23b45c67d89e01 ./bin/deploy\n```\n\n## Test Your Connection\n\nThe stack's outputs will contain the following information.\n\n- `MyDbCredentialsArn`\n- `MyDbProxyDbUrlParameterName`\n- `MyDbInstancEndpoint`\n- `MyDbProxyEndpoint`\n\nUsing the `MyDbCredentialsArn` value you can view your new `root` username \u0026 password by running the following command or by viewing it in the AWS Console under Secrets Manager.\n\n```shell\n$ aws secretsmanager get-secret-value \\\n  --secret-id \"arn:aws:secretsmanager:...\" \\\n  --query SecretString \\\n  --output text\n```\n\nSince this stack is created in your public subnets, you can use your favorite RDMBS tool like [MySQL Workbench](https://www.mysql.com/products/workbench/) to connect to your RDS instance using the `MyDbInstancEndpoint` output.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcustomink%2Flamby-rds-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcustomink%2Flamby-rds-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcustomink%2Flamby-rds-proxy/lists"}