2022-03-01から1ヶ月間の記事一覧

ハッシュパーティションのメンテナンス

DB

MySQL (8.0.26) drop table tab1; create table tab1( col1 bigint not null, col2 bigint not null) partition by hash ( col2 ) ( partition p1 , partition p2 , partition p3 , partition p4 , partition p5 , partition p6 , partition p7 , partition …

{APIGateway}チュートリアル: サンプルをインポートして REST API を作成する

AWS

https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/api-gateway-create-api-from-example.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip…

{APIGateway}チュートリアル: Lambda プロキシ統合を使用した Hello World REST API の構築

AWS

https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/api-gateway-create-api-as-simple-proxy-for-lambda.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-li…

{APIGateway}HTTP API のプライベート統合の使用

AWS

https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/http-api-private-integration.html HTTP API -> VPC link -> ALB -> EC2 -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com…

{APIGateway}チュートリアル: Lambda と DynamoDB を使用した CRUD API の構築

AWS

https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/http-api-dynamo-db.htmlhttps://cloudaffaire.com/how-to-create-an-api-gateway-with-lambda-integration-using-aws-cli/ -- 1. コマンド等のインストール -- 1.1 aws cli version 2 …

{APIGateway}API Gateway の開始方法

AWS

https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/getting-started.html https://cloudaffaire.com/how-to-create-an-api-gateway-with-lambda-integration-using-aws-cli/ -- 1. コマンド等のインストール -- 1.1 aws cli version 2 イ…

{Organizations}チュートリアル: CloudWatch Events を使用して、組織の重要な変更をモニタリングする

AWS

https://docs.aws.amazon.com/ja_jp/organizations/latest/userguide/orgs_tutorials_cwe.html 現在、AWS Organizations は、米国東部 (バージニア北部) リージョン でホストされています。このチュートリアルのステップを実行するには、米国東部 (バージニ…

{Organizations}サービスコントロールポリシー (SCPs)

AWS

https://docs.aws.amazon.com/ja_jp/organizations/latest/userguide/orgs_tutorials_basic.html 作業内容:OUを作成し、メンバーアカウントを移動t3.nanoのEC2を起動許可するサービスコントロールポリシーを作成し、OUにアタッチメンバーアカウントがt3.nan…

ワークロード再生

DB

MySQL (8.0.28)https://mita2db.hateblo.jp/entry/2020/08/30/193650https://github.com/Percona-Lab/query-playback Percona Playback ソースDB: mmm066ターゲットDB: mmm128 -- 1. Percona Playbackインストール[mmm128で実行] git clone https://github.c…

{CloudTrail}AWS CloudTrail Lake の使用

AWS

https://docs.aws.amazon.com/ja_jp/awscloudtrail/latest/userguide/cloudtrail-lake.htmlhttps://dev.classmethod.jp/articles/aws-cloudtrail-lake-audit-security/ イベントデータストアには、過去 7 日から 2555 日 (1 週間から最大 7 年間) にアカウン…

{CloudTrail}AWS Command Line Interface による組織の証跡の作成

AWS

https://docs.aws.amazon.com/ja_jp/awscloudtrail/latest/userguide/creating-trail-organization.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awsc…

{KMS}AWS KMS キーにキーマテリアルをインポートする

AWS

https://docs.aws.amazon.com/ja_jp/kms/latest/developerguide/importing-keys.htmlhttps://aws.amazon.com/jp/premiumsupport/knowledge-center/invalidciphertext-kms/ インポートされたキーマテリアルは、AWS KMS キーストアのマルチリージョン対称 KMS …

{KMS}マルチリージョンキーを作成する

AWS

https://docs.aws.amazon.com/ja_jp/kms/latest/developerguide/multi-region-keys-create.htmlhttps://dev.classmethod.jp/articles/kms-multi-region-keys/ マルチリージョンキーはグローバルではありません。マルチリージョンのプライマリキーを作成し、…

{KMS}非対称 KMS キーを作成する

AWS

https://docs.aws.amazon.com/ja_jp/kms/latest/developerguide/asymm-create-key.htmlhttps://dev.classmethod.jp/articles/asymmetric-encryption-with-aws-kms/ -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://aws…

{KMS}Amazon CloudWatch アラームを作成して、削除保留中の AWS KMS key の使用を検出する

AWS

https://docs.aws.amazon.com/ja_jp/kms/latest/developerguide/deleting-keys-creating-cloudwatch-alarm.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -…

{KMS}エイリアスの使用

AWS

https://docs.aws.amazon.com/ja_jp/kms/latest/developerguide/kms-alias.html 異なるリージョンに同じ名前のエイリアスを作成することができますエイリアスは、アカウントとリージョン内で一意である必要があります -- 1. コマンド等のインストール -- 1.1…

スケジューラジョブ実行

DB

MySQL (8.0.26)https://qiita.com/magaming/items/6a941ef1c2f673de8ae7 drop procedure proc1; delimiter //create procedure proc1(in p1 int)begin start transaction; update tab1 set col1 = p1; commit;end//delimiter ; select @@event_scheduler; cr…

{SQS}チュートリアル:Amazon Virtual Private Cloud から Amazon SQSキューにメッセージを送信する

AWS

https://docs.aws.amazon.com/ja_jp/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-sending-messages-from-vpc.html https://www.it-ouji.com/2021/11/02/aws-sqs%E3%82%AD%E3%83%A5%E3%83%BC%E3%81%B8%E3%81%AE%E3%83%A1%E3%83%83%E3%82%BB%E3%83%BC…

システム統計

DB

MySQL (8.0.26) 調べた限りなし Oracle (19c)https://docs.oracle.com/cd/F19136_01/tgsql/gathering-optimizer-statistics.html#GUID-AC23D691-5C54-4EF9-BF9F-65121F2AFC31 システム統計の手動収集を検討する場合Oracle Exadataを使用し、かつ、データベー…

{SNS}暗号化された Amazon SQS キューをサブスクライブして Amazon SNS トピックのサーバー側の暗号化 (SSE) を有効にする

AWS

https://docs.aws.amazon.com/ja_jp/sns/latest/dg/sns-enable-encryption-for-topic-sqs-queue-subscriptions.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zi…

{SNS}SMS メッセージの送信

AWS

https://docs.aws.amazon.com/ja_jp/sns/latest/dg/sns-mobile-phone-number-as-subscriber.html AWS アカウントが SMS サンドボックスにある場合に SMS メッセージの送信を開始するには、まず送信先電話番号を追加し、承認します。 -- 1. コマンド等のイン…

Embulk

DB

MySQL (8.0.26)https://qiita.com/777nancy/items/d5512bffab50a0796c5c 前提: Embulkインストール済 wget https://download.oracle.com/otn-pub/otn_software/jdbc/1914/ojdbc8-full.tar.gztar xvzf ojdbc8-full.tar.gzwget https://jdbc.postgresql.org/do…

{SNS}Kinesis Data Firehose 配信ストリームへのファンアウト

AWS

https://docs.aws.amazon.com/ja_jp/sns/latest/dg/sns-firehose-as-subscriber.html SNS --> Kinesis Data Firehose --> S3 -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x…

実行計画へのメモリサイズの影響

DB

SQL Server以外はメモリサイズで実行計画が変化する可能性がある MySQL (8.0.26) innodb_buffer_pool_sizeとjoin_buffer_sizeとを変更し、オプティマイザトレースを比較する -- 1. テストデータ作成 drop table tab1;create table tab1( col1 bigint ,col2 b…

{SNS}サブスクリプションの Amazon SNS デッドレターキューを設定する

AWS

https://docs.aws.amazon.com/ja_jp/sns/latest/dg/sns-configure-dead-letter-queue.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzi…

{SNS}サブスクリプションフィルターポリシーを適用する

AWS

https://docs.aws.amazon.com/ja_jp/sns/latest/dg/sns-subscription-filter-policies.htmlhttps://dev.classmethod.jp/articles/send-sms-only-to-subscriptions-that-match-message-filtering-policies-on-amazon-sns/ -- 1. コマンド等のインストール -- …

Embulkのインストール

OS

Ubuntu (20) https://www.embulk.org/https://qiita.com/da-sugi/items/13d4ead19c86d783ebb4http://www.ne.jp/asahi/hishidama/home/tech/embulk/install.html -- 1. Java 8インストール sudo apt install -y openjdk-8-jdkjava -version -- 2. Embulkのイ…

{EventBridge}チュートリアル: Amazon S3 オブジェクトが作成されたときに通知を送信する

AWS

S3 -> EventBridge -> SNS ※S3にイベント通知の設定追加が必要。S3から直接SNS送信も可能 -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip…

{EventBridge}チュートリアル: Eventbridge を使用して Amazon Kinesis ストリームにイベントを送信する

AWS

https://docs.aws.amazon.com/ja_jp/eventbridge/latest/userguide/eb-relay-events-kinesis-stream.html -- 1. コマンド等のインストール -- 1.1 aws cli version 2 インストール curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "aws…

SQLチューニング(delete文のwhere条件に更新テーブル追加)

DB

MySQL (8.0.26) drop table tab1;create table tab1( col1 bigint ,col2 bigint ); drop table tab2;create table tab2( col1 bigint ,col2 bigint ); drop table tab3;create table tab3( col1 bigint ,col2 bigint ); drop procedure proc1; delimiter //c…