With today’s launch, customers can execute custom scripts before, during, and after Amplify CLI commands (“amplify push”, “amplify api gql-compile”, and more). This allows you to extend Amplify’s best-practice defaults to meet your organization’s specific security guidelines and operational requirements. AWS Amplify CLI is a command line toolchain that helps frontend web and mobile developers create cloud backends and connect them to their app for common use cases. To create a command hook, customers place their bash shell scripts into the “amplify/hooks” folder with the associated Amplify CLI command as the script file name, such as “post-push.sh” or “pre-add-function.sh”. Command hooks support bash scripts by-default but customers can extend it with their preferred scripting runtime.
Source:: Amazon AWS