AWS CLI 2 for Exporting a Bot
https://docs.aws.amazon.com/lex/latest/dg/export-to-lex.html
https://docs.aws.amazon.com/lex/latest/dg/API_GetExport.html
Export all bots to lexbots directory as indivudual zip files. Be sure to update the region, currently set to us-east-1
mkdir lexbots
aws lex-models get-bots | grep name | cut -d '"' -f4 | \
while read -r name; do
echo $name
url=$(aws lex-models get-export --name $name --resource-type BOT --export-type LEX --resource-version 1 --region us-east-1 --output json | grep url | cut -d '"' -f4)
wget $url -O ./lexbots/$name.zip
done