Skip to content

Conversation

baka656
Copy link

@baka656 baka656 commented Apr 8, 2025

Description of changes:
Adding new genAI connector pattern Amazon RDS PostgreSQL for SAM

Security Review:
rds_postgresql_cfn_nag_result.txt

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

* [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [AWS Serverless Application Model](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) (AWS SAM) installed
* [Request Amazon Bedrock Model Access for Anthropic Claude models on Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html)
* Before deploying the solution, you need to set up an [Amazon RDS PostgreSQL DB](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.PostgreSQL.html) if you don't already have one. Prior to the RDS PostgreSQL setup, [Create and configure a VPC](https://docs.aws.amazon.com/vpc/latest/userguide/create-vpc.html) with at least two private subnets. During the database setup:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirm_changeset = true
capabilities = "CAPABILITY_NAMED_IAM"
disable_rollback = true
parameter_overrides = "ModelId=\"anthropic.claude-v2\" DatabaseHost=\"database-2.c96kksuaccrd.us-east-1.rds.amazonaws.com\" DatabaseName=\"medical\" TableName=\"patient_records\" SecretArn=\"arn:aws:secretsmanager:us-east-1:009160043239:secret:kendra-aurora-secret-byxLyk\" ChangeDetectingColumns=\"date_of_admission,discharge_date\" DocumentIdColumnName=\"id\" DocumentDataColumnName=\"medical_condition\" VpcId=\"vpc-00c024e8c89eb0a00\" SubnetIds=\"subnet-0433e65c91fabef8c, subnet-0f169b6a3bb23d25b, subnet-0360923af5f233b3f\" SecurityGroupIds=\"sg-004dadcb2eaa84be8\" KendraEdition=\"ENTERPRISE_EDITION\""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redact some of these as they're unique IDs anyways and also SecretArn reveals your Account ID

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diagram has to be updated to include the data source is PostgreSQL on RDS instead of the generic one that will apply for almost all patterns on repo

},
"gitHub": {
"template": {
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/lambda-kendra-bedrock",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this file as a whole isn't entirely relevant to this repo (since we aren't publishing this pattern as a blog on ServerlessLand) can you update these lines to reflect this pattern

@baka656 baka656 force-pushed the baka656-feature-kendra-bedrock-rds-postgresql-sam branch from e96bf18 to 4e618cc Compare May 6, 2025 22:32
Copy link
Contributor

@ragibmahsan ragibmahsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ragibmahsan ragibmahsan merged commit c66d7d1 into aws-samples:main May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants