Aurora PostgreSQL: Database Object creations using AWS CLI/SAM CLI/Cloud formation

0

We looking way to deploy the Database objects on the PostgreSQL Database without using the external tool like pgadmin4.

I know two commonly used method to deploy the database objects

  1. Connect to PostgreSQL cluster using third part tool and create the objects
  2. Lambda which execute the sql qurty on PostgreSQL Database

I'm wondering if there a way we can create objects via CLI or other way so we don't need to enable the Public Access for Database Cluster or Expose Port 5432 over the Internet.

1 Answer
0

As you say, you can use a Lambda to connect to the DB and execute SQL. If it's a VPC Lambda then you don't need your DB to be public or expose a port over the Internet.

You can integrate the Lambda tightly with CloudFormation as a Custom Resource or Resource Type.

For Custom Resources implemented in Python Lambdas, crhelper makes it really easy.

EXPERT
answered a year ago
  • Hi,

    Thanks for your response.

    I'm looking options other then lambda as we do have very large functions, tables etc. which will be very difficult to manage in the code file.

    AWS document suggest we do have such API on earlier Serverless 1 Instance Type but this only support older version of PostgreSQL.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions