LoginSignup
0
0

AWS CodeDeploy EC2にデプロイするときにhooksで実行するshellの出力先

Last updated at Posted at 2024-06-04

概要

CodeDeployでEC2にデプロイするときのhooksで呼ばれているshellの出力先をメモ的にまとめる。

前提

当該のEC2へは当該のCodeDeployを使ってデプロイが行えており、当該EC2にssh接続ができること。

内容

デプロイ先EC2の/opt/codedeploy-agent/deployment-root/deployment-logs/codedeploy-agent-deployments.logの中に出力されている。

例えば下記のようなshellを記載してデプロイ時に呼び出していたとする。

#!/bin/bash
echo "This is an output from the AfterInstall hook."

EC2の/opt/codedeploy-agent/deployment-root/deployment-logs/codedeploy-agent-deployments.logに下記のように出力される。

[stdout]This is an output from the AfterInstall hook.

※[stdout]は標準出力という意味らしい。

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