2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Amazon Aurora PostgreSQL express configurationについて

2
Last updated at Posted at 2026-03-26

2025年度末に突如降ってきたAmazon Aurora PostgreSQL express configuration。名前からはややわかりづらいのですが:

  • 数秒でクラスターを起動
  • VPCなし(デフォでIGW付属、IAM DB認証)

という代物です。少し動かした感想としては、NeonなどのDBaaSのような手軽さでAWSにPostgreSQLを起動できるもの、と受け入れられそうです。これはとてもうれしいことです。VPCなくていいんですよ奥さん。

動かしてみた

Screenshot_2026-03-26_at_9.10.20.png

ほとんど既定値から変えられない。ACUと識別子だけ変更可能。

Screenshot_2026-03-26_at_9.12.13.png10秒くらいで起動した

Screenshot_2026-03-26_at_9.32.28.pngIO optimizedなどは後から選択できる。後からVPCに載せることはできない。

PostgreSQLへの接続

import psycopg2
import boto3

auth_token = boto3.client('rds', region_name='ap-south-1').generate_db_auth_token(DBHostname='channy-express-db-instance-1.abcdef.ap-south-1.rds.amazonaws.com', Port=5432, DBUsername='postgres', Region='ap-south-1')

conn = None
try:
    conn = psycopg2.connect(
        host='channy-express-db-instance-1.abcdef.ap-south-1.rds.amazonaws.com',
        port=5432,
        database='postgres',
        user='postgres',
        password=auth_token,
        sslmode='require'
    )
    cur = conn.cursor()
    cur.execute('SELECT version();')
    print(cur.fetchone()[0])
    cur.close()

公式ブログより引用。IAM DB認証を用いて、揮発性のトークンを用いて接続する。

クラウドシェル

https___qiita-image-store.s3.ap-northeast-1.amazonaws.com_0_73197_8a757c1d-666b-4088-a2e0-7f5647a6f105 copy.jpgクラウドシェルでSQLの実行もかんたん

感想

サーバーレスにやりたいけどRDBを使いたい、でもVPCが必要なのかぁ、という典型的なかなしみを癒す神アプデでした。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?