This file contains hidden or 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 multiprocessing import Pool | |
import boto3 | |
def move_to_glacier(f): | |
sess = boto3.session.Session(region_name='us-east-1') | |
s3res = sess.resource('s3') | |
copy_source = { |
This file contains hidden or 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 | |
sess = boto3.session.Session(region_name='us-east-1') | |
s3res = sess.resource('s3') | |
gazillion_files = [('my-source-bucket', 'file-000000000001'), ...] | |
for f in gazillion_files: | |
copy_source = { | |
'Bucket': f[0], |
This file contains hidden or 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
def move_file_to_glacier(list_of_rows): | |
sess = boto3.session.Session(region_name='us-east-1') | |
s3res = sess.resource('s3') | |
for row in list_of_rows: | |
copy_source = { | |
'Bucket': row[0], | |
'Key': row[1] | |
} |
This file contains hidden or 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
kind: Namespace | |
apiVersion: v1 | |
metadata: | |
name: airflow-on-k8s |
This file contains hidden or 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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: tasks-sva | |
namespace: airflow-on-k8s | |
annotations: | |
eks.amazonaws.com/role-arn: arn:aws:iam::<your-aws-account-id>:role/AirflowK8SRole |
This file contains hidden or 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": [ | |
{ | |
"Sid": "", | |
"Effect": "Allow", | |
"Principal": { | |
"Federated": "arn:aws:iam::<your-aws-account>:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/<oidc-of-your-eks-cluster>" | |
}, | |
"Action": "sts:AssumeRoleWithWebIdentity", |
This file contains hidden or 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
kind: ServiceAccount | |
apiVersion: v1 | |
metadata: | |
name: scheduler-sva | |
namespace: airflow-on-k8s |
This file contains hidden or 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
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: webserver-svc | |
namespace: airflow-on-k8s | |
spec: | |
type: ClusterIP | |
selector: | |
tier: airflow | |
component: webserver |
This file contains hidden or 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
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
name: airflow-scheduler | |
namespace: airflow-on-k8s | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
tier: airflow |
This file contains hidden or 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
kind: StorageClass | |
apiVersion: storage.k8s.io/v1 | |
metadata: | |
name: efs-sc | |
provisioner: efs.csi.aws.com |
NewerOlder