This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void readSecret() { | |
try { | |
URL yahoo = new URL("http://localhost:2773/secretsmanager/get?secretId=/authorizer/jwt"); | |
URLConnection yc = yahoo.openConnection(); | |
yc.setRequestProperty("X-Aws-Parameters-Secrets-Token", System.getenv("AWS_SESSION_TOKEN")); | |
BufferedReader in = new BufferedReader( | |
new InputStreamReader( | |
yc.getInputStream())); | |
String inputLine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use cloudwatch API with Boto3 to get the highest requests per second over a given month for wafv2 | |
import boto3 | |
from datetime import datetime, timedelta | |
client = boto3.client("cloudwatch") | |
response = client.get_metric_statistics( | |
Namespace="AWS/WAFV2", | |
MetricName="AllowedRequests", | |
Dimensions=[ | |
{"Name": "WebACL", "Value": "test"}, |
OlderNewer