2021-08-01から1ヶ月間の記事一覧

{Neptune}一時的な認証情報を使用した IAM 認証

AWS

-- 1. DBクラスター作成(IAM認証有効化) aws neptune create-db-cluster \--db-cluster-identifier cluster01 \--engine neptune \--engine-version 1.0.5.0 \--port 8182 \--no-storage-encrypted \--no-deletion-protection \--enable-iam-database-authen…

{Timestream}Accessing Amazon Timestream Using the AWS CLI

AWS

前提:aws-cli/2.2.33※aws cli version 1の場合、エラー export AWS_DEFAULT_REGION=us-east-1 -- 1. データベース作成 aws timestream-write create-database \--database-name test -- 2. テーブル作成 aws timestream-write create-table \--database-nam…

{Keyspaces}Amazon Keyspaces (Apache Cassandra 向け) ポイントインタイムリカバリ

AWS

-- 前提: cqlshインストール済 -- 1. サービス固有の認証情報を生成する aws iam create-service-specific-credential \--user-name iamuser \--service-name cassandra.amazonaws.com -- 2. DB接続 cd /home/ec2-user/apache-cassandra-3.11.11./bin/cqlsh …

{Keyspaces}Application Auto Scaling による Amazon Keyspaces スループットキャパシティーの管理

AWS

-- 前提: cqlshインストール済 -- 1. サービス固有の認証情報を生成する aws iam create-service-specific-credential \--user-name iamuser \--service-name cassandra.amazonaws.com -- 2. DB接続 cd /home/ec2-user/apache-cassandra-3.11.11./bin/cqlsh …

{Keyspaces}Amazon Keyspaces (Apache Cassandra 向け)

AWS

-- 1. EX2(Amazon Linux2)へのcqlsh のインストール python --version wget https://dlcdn.apache.org/cassandra/3.11.11/apache-cassandra-3.11.11-bin.tar.gztar xvzf apache-cassandra-3.11.11-bin.tar.gzcd apache-cassandra-3.11.11 ./bin/cqlsh --vers…

{QLDB}QLDB でのストリームの作成と管理

AWS

https://dev.classmethod.jp/articles/amazon-qldb-supports-real-time-streaming/https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/with-kinesis.htmlhttps://hacknote.jp/archives/48083/ -- 前提: QLDBシェルインストール済み -- 1. Kinesis ストリー…

{QLDB}Amazon QLDB からのジャーナルデータのエクスポート

AWS

-- 前提: QLDBシェルインストール済み -- 1. S3バケット作成 aws s3 mb s3://bucket123aws s3 ls -- 2. IAMポリシー作成vim policy01.json { "Version": "2012-10-17", "Statement": [ { "Sid": "QLDBJournalExportS3Permission", "Action": [ "s3:PutObject…

{QLDB}Amazon QLDB へのアクセス

AWS

-- 1. 台帳の作成aws qldb create-ledger \--name qldb01 \--permissions-mode STANDARD \--no-deletion-protection -- 2. 台帳一覧aws qldb list-ledgers aws qldb describe-ledger --name qldb01 -- 3. QLDB シェルを使用した Amazon QLDB へのアクセス ク…

{Neptune}Amazon Neptune DB クラスターのバックアップと復元

AWS

手動 DB クラスタースナップショットを共有すると、暗号化されているかいないかに関係なく、権限のある DB クラスタースナップショットがAWSアカウントを使用して、DB クラスターをコピーしてそこから復元するのではなく、スナップショットから DB クラスタ…

{Neptune}Neptune イベント通知の使用

AWS

-- 1. SNSトピック作成 aws sns list-topicsaws sns list-subscriptions aws sns create-topic --name topic01 aws sns subscribe --topic-arn arn:aws:sns:ap-northeast-1:999999999999:topic01 --protocol email --notification-endpoint admin@example.co…

{Neptune}Amazon Neptune クラスターで監査ログを使用する

AWS

-- 1. クラスターパラメータグループの作成 aws neptune create-db-cluster-parameter-group \--db-cluster-parameter-group-name cpg01 \--db-parameter-group-family neptune1 \--description "cpg01" aws neptune describe-db-cluster-parameter-groups |…

{Neptune}Neptune ストリームを使用する

AWS

-- 前提: Gremlin コンソールインストール済み -- 1. クラスターパラメータグループの作成 aws neptune create-db-cluster-parameter-group \--db-cluster-parameter-group-name cpg01 \--db-parameter-group-family neptune1 \--description "cpg01" aws ne…

{Neptune}Neptune でのデータベースのクローン化

AWS

-- 1. DBクラスター作成 aws neptune create-db-cluster \--db-cluster-identifier cluster01 \--engine neptune \--engine-version 1.0.5.0 \--port 8182 \--no-storage-encrypted \--no-deletion-protection aws neptune create-db-instance \--db-cluster…

{Neptune}Amazon Neptune バルクローダーを使用したデータの取り込み

AWS

-- 前提: Gremlin コンソールインストール済み -- 1. S3バケット作成 aws s3 mb s3://bucket123aws s3 ls -- 2. IAMロール作成vim role01.json { "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "Service": [ "rd…

{Neptune}DB クラスターの起動

AWS

https://qiita.com/mksamba/items/c3fffca815da97600287 -- 1. DBクラスター作成 aws neptune create-db-cluster \--db-cluster-identifier cluster01 \--engine neptune \--engine-version 1.0.5.0 \--port 8182 \--no-storage-encrypted \--no-deletion-pr…

数字のみのレコード抽出

DB

MySQL (8.0.22)https://qiita.com/bezeklik/items/d8d74deece96cb446998 drop table tab1;create table tab1(col1 varchar(100));insert into tab1 values('0001');insert into tab1 values('A001');insert into tab1 values('00A1');insert into tab1 value…

{DocumentDB}Amazon DocumentDB オペレーションのプロファイリング

AWS

-- 1. クラスターパラメータグループの作成 aws docdb create-db-cluster-parameter-group \--db-cluster-parameter-group-name cpg01 \--db-parameter-group-family docdb4.0 \--description "cpg01" aws docdb describe-db-cluster-parameter-groups | gre…

{DocumentDB}Amazon DocumentDB イベントサブスクリプションの使用

AWS

前提:aws-cli/2.2.32※aws cli version 1の場合、エラー発生 -- 1. SNSトピック作成 aws sns list-topicsaws sns list-subscriptions aws sns create-topic --name topic01 aws sns subscribe --topic-arn arn:aws:sns:ap-northeast-1:999999999999:topic01 …

{DocumentDB}Amazon DocumentDB グローバルクラスターの概要

AWS

グローバルクラスタは、t3 および r4 インスタンスタイプではサポートされません。グローバルクラスターは、Amazon DocumentDB v3.6 ではサポートされていません。 前提:aws-cli/2.2.32※aws cli version 1の場合、エラー発生 -- 1. プライマリクラスターの…

{DocumentDB}特定時点への復元

AWS

-- 1. Amazon DocumentDB クラスターの作成 aws docdb create-db-cluster \--db-cluster-identifier cluster01 \--engine docdb \--engine-version 4.0.0 \--port 27017 \--master-username test \--master-user-password 'password' \--no-storage-encrypte…

{DocumentDB}Amazon DocumentDB クラスターのスナップショットの共有

AWS

-- 1. KMSカスタマキーの作成vim key01.json { "Id": "key01", "Version": "2012-10-17", "Statement": [ { "Sid": "Enable IAM User Permissions", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::999999999999:root" }, "Action": "kms:*", "Res…

{DocumentDB}手動クラスタースナップショットの作成

AWS

-- 1. Amazon DocumentDB クラスターの作成 aws docdb create-db-cluster \--db-cluster-identifier cluster01 \--engine docdb \--engine-version 4.0.0 \--port 27017 \--master-username test \--master-user-password 'password' \--no-storage-encrypte…

{DocumentDB}データのダンプ、復元、インポート、およびエクスポート

AWS

-- 1. Amazon DocumentDB クラスターの作成 aws docdb create-db-cluster \--db-cluster-identifier cluster01 \--engine docdb \--engine-version 4.0.0 \--port 27017 \--master-username test \--master-user-password 'password' \--no-storage-encrypte…

{DocumentDB}監査の有効化

AWS

-- 1. クラスターパラメータグループの作成 aws docdb create-db-cluster-parameter-group \--db-cluster-parameter-group-name cpg01 \--db-parameter-group-family docdb4.0 \--description "cpg01" aws docdb describe-db-cluster-parameters \--db-clust…

{DocumentDB}Amazon DocumentDB の使用開始

AWS

-- 1. Amazon DocumentDB クラスターの作成 aws docdb describe-orderable-db-instance-options \--engine docdb | jq -rc '.OrderableDBInstanceOptions[] | [ .EngineVersion, .DBInstanceClass ]' aws docdb create-db-cluster \--db-cluster-identifier …

カーソル

DB

MySQL (8.0.22)https://dev.mysql.com/doc/refman/8.0/ja/cursors.html 暗黙カーソル、パラメータつきカーソルは不可 drop table tab1;create table tab1(col1 int,col2 int);insert into tab1 values(1,100);insert into tab1 values(2,200);insert into ta…

{DynamoDB}DynamoDB でテーブルのエクスポートをリクエストする

AWS

DynamoDB テーブルを S3 バケットにエクスポートすると、Athena、AWS Glue、Lake Formation などの他の AWS サービスを使用して、データの分析や複雑なクエリを有効にできます。 Amazon DynamoDB テーブルから Amazon S3 バケットにデータをエクスポートする…

プロシージャ引数のデフォルト値指定

DB

MySQL (8.0.22) ★デフォルト値は指定できない Oracle (19c) set serveroutput oncreate or replace procedure proc1(param1 in number default 100)asbegin for i in 1..param1 loop dbms_output.put_line(i); end loop;end;/show error; exec proc1;exec pr…

{DynamoDB}DAX クラスターを作成する

AWS

① DAX 項目キャッシュの動作---- 読み込み操作リクエストが結果的に整合性のある読み込み (デフォルトの動作) を指定する場合は、その項目を DAX から読み込もうとします。 DAX に項目がある場合 (キャッシュヒット)、DAX は DynamoDB にアクセスせずにアプ…

{DynamoDB}DynamoDB バックアップ

AWS

https://docs.aws.amazon.com/ja_jp/amazondynamodb/latest/developerguide/backuprestore_HowItWorks.html 以下は、復元されたテーブルで手動で設定する必要があります。 Auto Scaling ポリシーAWS Identity and Access Management (IAM) ポリシーAmazon Cl…