AWS CLI Terakhir Deploy

applicationName="my-application-name"
deploymentGroupName="my-deployment-group"
lastSuccessfulDeployment=$(aws deploy list-deployments --application-name $applicationName --deployment-group-name $deploymentGroupName --include-only-statuses "Succeeded" --query 'deployments[0]' --output text)
s3Location=$(aws deploy get-deployment --deployment-id $lastSuccessfulDeployment --query 'deploymentInfo.revision.s3Location')
aws deploy create-deployment --application-name $applicationName --deployment-group-name $deploymentGroupName --s3-location $s3Location
Real Rat