Can you query the deployment status of an AWS Amplify preview build from the CLI or an API?
If so how?
I've been unable to find anything related to my question. I keep getting pages that say "run amplify status", which is not even close to what I'm looking for.
I'm trying to query for this information for a particular preview build from GitLab CI so that my job will wait for the preview build to be deployed before running functional tests, and not a second longer. Currently I'm using a time delay, which slows down how quickly I can get feedback.
The list-jobs AWS CLI command will return a JSON response containing all builds, including the most recent one first. Each object will include a status field. See the docs for it here.
You can use it like so:
aws amplify list-jobs --app-id <your app id> --branch-name <your branch name> --region <your region>
Obviously, you must be authenticated with the AWS CLI before running the command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With