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
#!/bin/bash | |
# OpenSearch parameters | |
HOST="https://your-opensearch-url" | |
INDEX="app" | |
# Function to generate random data | |
generate_random_data() { | |
echo "{ \"timestamp\": \"$(date -Is)\", \"value\": $RANDOM }" | |
} |
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
import boto3 | |
import logging | |
eip_tag_key = "EIP-fleet" | |
eip_tag_value = "true" | |
dynamodb_table = "EC2-Spots-EIP" | |
logger = logging.getLogger() | |
logger.setLevel("INFO") |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"dynamodb:Scan", | |
"dynamodb:PutItem", | |
"dynamodb:UpdateItem" | |
], |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"es:ESHttpPost", | |
"es:ESHttpPut" | |
], | |
"Resource": "arn:aws:es:us-east-1:XXXXXXXXXXXX:domain/sandbox" |
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
{ | |
"Version": "2008-10-17", | |
"Statement": [ | |
{ | |
"Sid": "", | |
"Effect": "Allow", | |
"Principal": { | |
"Service": "ecs-tasks.amazonaws.com" | |
}, | |
"Action": "sts:AssumeRole" |
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
{ | |
"family": "nginx", | |
"executionRoleArn": "arn:aws:iam::XXXXXXXXXXXX:role/ecsTaskExecutionRole", | |
"taskRoleArn": "arn:aws:iam::XXXXXXXXXXXX:role/Sandbox-ECS-Nginx-Service-Role", | |
"containerDefinitions": [ | |
{ | |
"name": "log_router", | |
"image": "docker.io/amazon/aws-for-fluent-bit:latest", | |
"cpu": 0, | |
"memoryReservation": 50, |
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
resource "aws_lb_listener_rule" "cognito" { | |
listener_arn = aws_alb_listener.kibana-listener-https.arn | |
### ALB in "eu-west-3" region doesn't support "authenticate-cognito" method ### | |
# action { | |
# type = "authenticate-cognito" | |
# authenticate_cognito { | |
# scope = "openid" | |
# user_pool_arn = var.cognito_user_pool_arn |
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
cgi.fix_pathinfo = 0 | |
short_open_tag = Off | |
display_errors = Off | |
display_startup_errors = Off | |
allow_url_fopen = Off | |
allow_url_include = Off |
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
disable_functions = exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source |
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
# Generating a summary for a $MODULES_OUTPUT file | |
ENVIRONMENT_STAT="$(cat $ENVIRONMENT_OUTPUT | grep -v -e '^$' | grep -v -P '^[0-9]+\ +issue\(s\)\ +found:' | grep -v -P '^(ENVIRONMENT: .[a-zA-Z]+.*)' | wc -l)" | |
if [[ -f "$MODULES_OUTPUT" ]] | |
then | |
MODULE_STAT="$(cat $MODULES_OUTPUT | grep -v -e '^$' | grep -v -P '^[0-9]+\ +issue\(s\)\ +found:' | grep -v -P '^(MODULE: .\/[a-z0-9]+.*)' | wc -l)" | |
else | |
MODULE_STAT="0" | |
fi | |
echo -e "\n\n\n" |
NewerOlder