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 time | |
import requests | |
import logging | |
import boto3 | |
from botocore.config import Config | |
def send_price_data_to_timestream(write_client): | |
base_url = "https://min-api.cryptocompare.com/data" | |
symbols = "BTC,ETH,REP,DASH" |
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 time | |
import requests | |
import logging | |
import boto3 | |
from botocore.config import Config | |
def send_price_data_to_timestream(write_client): | |
base_url = "https://min-api.cryptocompare.com/data" | |
symbols = "BTC,ETH,REP,DASH" |
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 requests | |
import boto3 | |
import uuid | |
import time | |
import json | |
client = boto3.client('kinesis', region_name='eu-central-1') | |
partition_key = str(uuid.uuid4()) | |
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 requests | |
import boto3 | |
import uuid | |
import time | |
import json | |
client = boto3.client('kinesis', region_name='eu-central-1') | |
partition_key = str(uuid.uuid4()) | |
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 uuid | |
import json | |
import random | |
import logging | |
from datetime import datetime | |
logging.basicConfig(format="[%(levelname)s] [%(name)s] [%(asctime)s]: %(message)s", | |
level="INFO") | |
logger = logging.getLogger(__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
import boto3 | |
import uuid | |
import json | |
import random | |
import logging | |
from datetime import datetime | |
logging.basicConfig(format="[%(levelname)s] [%(name)s] [%(asctime)s]: %(message)s", | |
level="INFO") | |
logger = logging.getLogger(__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
import json | |
import logging | |
import requests | |
import pandas as pd | |
import awswrangler as wr | |
from typing import List, Any | |
logger = logging.getLogger() | |
logger.setLevel(logging.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
import json | |
import logging | |
import requests | |
import pandas as pd | |
import awswrangler as wr | |
from typing import List, Any | |
class DataQualityAlert: | |
def __init__(self, slack_webhook_url: str, database: str = "ecommerce"): |
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 json | |
import logging | |
import requests | |
import pandas as pd | |
import awswrangler as wr | |
from typing import List, Any | |
class DataQualityAlert: | |
def __init__(self, slack_webhook_url: str, database: str = "ecommerce"): |
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
SELECT | |
resourceId, | |
resourceType, | |
awsRegion, | |
resourceCreationTime, | |
tags, | |
configuration.state.value | |
WHERE | |
resourceType NOT IN ('AWS::EC2::SecurityGroup', | |
'AWS::EC2::Subnet', 'AWS::EC2::VPC', |
NewerOlder