Skip to content

Instantly share code, notes, and snippets.

@AksAman
Last active February 16, 2023 13:55
Show Gist options
  • Select an option

  • Save AksAman/5094061b9ea4deabcd85ca5b51ea609d to your computer and use it in GitHub Desktop.

Select an option

Save AksAman/5094061b9ea4deabcd85ca5b51ea609d to your computer and use it in GitHub Desktop.
Watch/Monitor AWS Amplify jobs build status
# Get the app id and branch name from the output of the below command.
# If you already know the app id and branch name, you can skip to step 2
# STEP 1
aws amplify list-apps --output table --query "apps[*].{name:name,appId:appId,branch:productionBranch.branchName}"
# output
# ----------------------------------------------
# | ListApps |
# +-----------------+---------+----------------+
# | appId | branch | name |
# +-----------------+---------+----------------+
# | xxxxxxxxxxxxxx | b1 | app1 |
# | xxxxxxxxxxxxxx | b2 | app2 |
# +-----------------+---------+----------------+
# STEP 2
# Get the appId and branch from the above output
APPID=xxxxxxxxxxxxx1 # replace with the appId
BRANCH=b1 # replace with the branch name, exa: b1
# watch the build output
watch -d -n 5 "aws amplify list-jobs --app-id $APPID --branch-name $BRANCH --output table --query 'jobSummaries[*].{jobId:jobId,commitMessage:commitMessage,status:status}'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment