[awscli]CloudWatch Logsにテストログを出力


aws --profile=hoge --log-group-name hoge --log-stream-name hoge --log-events timestamp=$(node -e 'console.log(Date.now())'),message="Error"

An error occurred (InvalidSequenceTokenException) when calling the PutLogEvents operation: The given sequenceToken is invalid. The next expected sequenceToken is: xxxxxxxxxxxxxxxxx

予めnodejsをインストールしておく、上記実行後sequence-tokenを指定すればOK。

aws --profile=hoge --log-group-name hoge --log-stream-name hoge --log-events timestamp=$(node -e 'console.log(Date.now())'),message="Error" --sequence-token xxxxxxxxxxxx

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *