Skip to content

Instantly share code, notes, and snippets.

View brinhosa's full-sized avatar

Rafael brinhosa

View GitHub Profile
@brinhosa
brinhosa / remove-all-from-docker.sh
Last active December 23, 2021 12:04 — forked from beeman/remove-all-from-docker.sh
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@brinhosa
brinhosa / process_cognito_users.py
Created December 7, 2021 17:46 — forked from jpbarto/process_cognito_users.py
Simple script to read users in a Cognito user pool, check them for failed logins, and put those failed logins to CloudWatch logs
#!/usr/bin/env python3
"""
The following script demonstrates how to use the AWS Boto3 SDK to iterate through
all of the users in an AWS Cognito User Pool and examine the events associated
with each user.
If any failed authentication events are found the script formats them as messages
and logs them to CloudWatch logs.
This script could easily be modified to run periodically as a Lambda function