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 json | |
| import requests | |
| import time | |
| import datetime | |
| import boto3 | |
| from boto3.dynamodb.conditions import Key | |
| from boto3.dynamodb.conditions import Attr | |
| # AWS Resource and Client | |
| dynamodb = boto3.resource('dynamodb', region_name='us-east-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
    
  
  
    
  | [ | |
| { | |
| "IndexName": "siteStatus-site-Index", | |
| "KeySchema": [ | |
| { | |
| "AttributeName": "siteStatus", | |
| "KeyType": "HASH" | |
| }, | |
| { | |
| "AttributeName": "site", | 
  
    
      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
    
  
  
    
  | key_name = "key-sbali" | |
| keyring_name = "keyring-sbali" | |
| region = "us-central1" | |
| bucket_name = "sbali-storage" | 
  
    
      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 json | |
| import boto3 | |
| cwl = boto3.client('logs') | |
| def logretention(event, context): | |
| ''' | |
| Method invoked by AWS to start the function | |
| ''' | |
| token = None | 
  
    
      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 nginx:latest | |
| EXPOSE 80 | |
| CMD ["nginx", "-g", "daemon off;"] | 
  
    
      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
    
  
  
    
  | data "aws_caller_identity" "current" {} | 
  
    
      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
    
  
  
    
  | #!/bin/sh -x | |
| sudo sh -c 'apt-get update -y' | |
| sudo sh -c 'apt-get upgrade -y' | 
  
    
      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
    
  
  
    
  | service: ecslogger # NOTE: update this with your service name | |
| provider: | |
| name: aws | |
| runtime: python3.7 | |
| environment: | |
| DYNAMODB_TABLE: ${self:service} | |
| stage: prd | |
| iamRoleStatements: | 
  
    
      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 | |
| import time | |
| import json | |
| from datetime import datetime, timedelta, timezone | |
| asgclient = boto3.client('autoscaling') | |
| ec2client = boto3.client('ec2') | |
| def asg_ec2_age_check(event, context): | |
| ''' | 
  
    
      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
    
  
  
    
  | service: asgec2agecheck # NOTE: update this with your service name | |
| provider: | |
| name: aws | |
| runtime: python3.7 | |
| deploymentBucket: sbali-serverless-us | |
| tags: | |
| CostCenter: infra | |
| stage: prd | |
| iamRoleStatements: |