0
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?

More than 1 year has passed since last update.

【悲報】AppRunnerドキュメントのイベント名全然違う件

Posted at

はじめに

AppRunnerのデプロイ完了時に、通知が出したくて調べたところ、EventBridgeできそう(リンク
この通りにやったらうまくいかない!!

結論

detail-typeも違うし、なんかキー名全然違う(笑)
公式ドキュメントだと「Service Status Change」のものが、実際は、「AppRunner Service Status Change」だった。他にもいろいろ違ったので、以下イベント例。

{
	"version": "",
	"id": "xxxxxxxxxxxxxxxxxxxxxxxxxx,
	"detail-type": "AppRunner Service Status Change",
	"source": "aws.apprunner",
	"account": "123456789012",
	"time": "yyyy-mm-ddThh:MM:ssZ",
	"region": "ap-northeast-1",
	"resources": [
		"arn:aws:apprunner:ap-northeast-1:123456789012:service/xxxxxxxxx"
	],
	"detail": {
		"serviceId": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
		"serviceName": "xxxxxxxxxx",
		"message": "Service status is set to RUNNING.",
		"previousServiceStatus": "OPERATION_IN_PROGRESS",
		"currentServiceStatus": "RUNNING",
		"severity": "INFO"
	}
}

みたいな感じなので、デプロイ成功時に通知を出す場合は以下のような感じ!
サービス名もフィルタした方がよさそうだけど、公式ドキュメントもたまには間違ってるので気をつけなはれや!!

{
  "detail-type": ["AppRunner Service Status Change"],
  "source": ["aws.apprunner"],
  "account": ["123456789012"],
  "detail": {
    "previousServiceStatus": ["OPERATION_IN_PROGRESS"],
    "currentServiceStatus": ["RUNNING"]
  }
}
0
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
0
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?