Fetch dummy data folders and files
curl https://s3.amazonaws.com/ds2002-resources/data/bundle.tar.gz > \
bundle.tar.gz && \
tar -xzvf bundle.tar.gz && \
rm bundle.tar.gz
from airflow import Dataset | |
from airflow.decorators import ( | |
dag, | |
task, | |
) | |
from airflow.models import Variable | |
from pendulum import datetime, duration | |
import requests | |
from pymongo import MongoClient, errors | |
from bson.json_util import dumps |
import boto3 | |
from botocore.exceptions import ClientError | |
def get_secret(secret_name,region_name): | |
# Create a Secrets Manager client | |
session = boto3.session.Session() | |
client = session.client( | |
service_name='secretsmanager', | |
region_name=region_name |
#!/bin/bash | |
mkfs -t xfs /dev/xvdh | |
mkdir /mnt/volume2 | |
mount -t xfs /dev/xvdh /mnt/volume2 | |
echo "/dev/xvdh /mnt/volume2 xfs defaults 0 0" > /etc/fstab |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: >- | |
AWS CloudFormation Sample Template EIP_With_Association: This template | |
creates an Amazon EC2 instance and an Elastic IP Address. You will be | |
billed for the AWS resources used if you create a stack from this template. | |
Parameters: | |
InstanceType: | |
Description: Web Server EC2 instance type | |
Type: String | |
Default: t2.small |
#cloud-config | |
repo_update: true | |
repo_upgrade: all | |
packages: | |
- docker | |
- jq | |
- htop | |
runcmd: |
name: Remote Dispatch Action | |
on: [ repository_dispatch, workflow_dispatch ] | |
jobs: | |
update-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Event Information |
name: Container Build CICD | |
on: | |
push: | |
branches: | |
- 'main' | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: org/container-name |
#!/usr/bin/env python | |
##### THIS IS A DESTRUCTIVE SCRIPT - USE WITH CAUTION OR SET DryRun=True | |
import datetime | |
import sys | |
import boto3 | |
# Set these two variables before running: |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: 'Simple CloudFront distribution with an S3 origin' | |
Parameters: | |
S3BucketName: | |
Type: String | |
Description: The name for the S3 bucket - must be unique across all of AWS | |
AllowedPattern: '^[a-z0-9]{5,40}$' | |
Resources: |