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
resource "aws_cloudwatch_log_group" "sample_container_cloudwatch" { | |
name = "/ecs/${var.sample_container}_${var.ENV_NAME}" | |
tags = { | |
Environment = "${var.ENV_NAME}" | |
Application = "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
sudo: required | |
language: python | |
cache: pip | |
services: | |
- docker | |
env: | |
global: | |
- EB_REGION="us-east-1" | |
- secure: secure_AWS_ACCOUNT_ID | |
- secure: secure_AWS_ACCESS_KEY_ID |
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
# location: containers/sample_container/.dockerfile | |
# Base Image | |
FROM python:3.7-slim | |
# DocStr | |
LABEL environment for test_task | |
MAINTAINER Ensemble Energy | |
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 airflow import DAG | |
from airflow.operators.python_operator import PythonOperator | |
from airflow.contrib.operators.ecs_operator import ECSOperator | |
import os | |
from datetime import datetime, timedelta | |
import boto3 | |
import json | |
from config import * | |
default_args = { |
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
-- Create a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |