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 | |
# List all buckets | |
buckets=$(aws s3api list-buckets --query 'Buckets[].Name' --output text) | |
for bucket in $buckets; do | |
echo "Processing bucket: $bucket" | |
# Prompt user for action | |
read -p "Do you want to empty and delete the bucket $bucket? (y/n): " response |
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
name: build-and-deploy | |
# Controls when the action will run. Triggers the workflow on push | |
# but only for the master branch. | |
on: | |
push: | |
branches: | |
- main | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
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 | |
python3 -m pip install wheel | |
python3 setup.py bdist_wheel | |
export "BUCKET_NAME=$(yq e '.bucket_name' config/properties.yml)" | |
for JOB_DIR in ./src/jobs/job*; do | |
JOB_NAME_RAW=$(basename $JOB_DIR) | |
JOB_NAME="$(tr '[:lower:]' '[:upper:]' <<< ${JOB_NAME_RAW:0:1})${JOB_NAME_RAW:1}" # Capitalizing the first letter | |
YAML_PATH=".Resources.Glue${JOB_NAME}.Properties.DefaultArguments" |
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 os | |
import sys | |
from awsglue.utils import getResolvedOptions | |
def load_env(environment): | |
if environment == "local": | |
from dotenv import load_dotenv | |
load_dotenv(".env") | |
def get_env_or_args(env_name): |
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
from setuptools import setup | |
setup( | |
packages=["utils"], | |
name="utilities", | |
version="0.1", | |
install_requires=[] | |
) |
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
{ | |
"containerDefinitions": [ | |
{ | |
"name": "service-gateway", | |
"image": "840364872350.dkr.ecr.ap-southeast-1.amazonaws.com/aws-appmesh-envoy:v1.25.1.0-prod", | |
"cpu": 0, | |
"portMappings": [ | |
{ | |
"name": "service-gateway-9080-tcp", | |
"containerPort": 9080, |
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
{ | |
"ipcMode": null, | |
"executionRoleArn": "arn:aws:iam::<AWS_ACCOUNT_ID>:role/ecsTaskExecutionRole", | |
"containerDefinitions": [ | |
{ | |
"dnsSearchDomains": null, | |
"environmentFiles": null, | |
"logConfiguration": { | |
"logDriver": "awslogs", | |
"secretOptions": null, |
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
{ | |
"ipcMode": null, | |
"executionRoleArn": "arn:aws:iam::<AWS_ACCOUNT_ID>:role/ecsTaskExecutionRole", | |
"containerDefinitions": [ | |
{ | |
"dnsSearchDomains": null, | |
"environmentFiles": null, | |
"logConfiguration": { | |
"logDriver": "awslogs", | |
"secretOptions": null, |