You can run integration tests inside a lambda that is called by a custom resource during deployment. When the tests fail, CloudFormation will roll back the deployment.
Companies Mentioned
Ben Force
@theBenForce
5x AWS Certified Senior Software Engineer. I write about architecture, infrastructure as code, and automation.