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
| ColorQueueSubscription: | |
| Type: AWS::SNS::Subscription | |
| Properties: | |
| Endpoint: !GetAtt ColorQueue.Arn | |
| Protocol: sqs | |
| RawMessageDelivery: True | |
| TopicArn: !Ref SNSTopic |
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
| ColorQueueSubscription: | |
| Type: AWS::SNS::Subscription | |
| Properties: | |
| Endpoint: !GetAtt ColorQueue.Arn | |
| Protocol: sqs | |
| RawMessageDelivery: True | |
| TopicArn: !Ref SNSTopic |
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
| QueuePolicy: | |
| Type: AWS::SQS::QueuePolicy | |
| Properties: | |
| Queues: | |
| - !Ref ColorQueue | |
| - !Ref BlueYellowQueue | |
| - !Ref RedQueue | |
| - !Ref GreenHighQueue | |
| - !Ref GreenLowQueue | |
| PolicyDocument: |
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 os | |
| import json | |
| import boto3 | |
| import logging | |
| from botocore.exceptions import ClientError | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| def get_ddb_connection(): |
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
| textract = boto3.client('textract') | |
| textract.start_document_analysis( | |
| DocumentLocation={ | |
| 'S3Object': { | |
| 'Bucket': bucket, | |
| 'Name': key | |
| } | |
| }, | |
| JobTag=key + '_Job', | |
| FeatureTypes=[ |
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
| kibana: | |
| image: docker.elastic.co/kibana/kibana:7.1.1 | |
| depends_on: | |
| - logstash | |
| ports: | |
| - 5601:5601 | |
| networks: | |
| - logging-network |
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
| # This file is where you define your pipelines. You can define multiple. | |
| # For more information on multiple pipelines, see the documentation: | |
| # https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html | |
| - pipeline.id: main | |
| path.config: "/usr/share/logstash/pipeline" |
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
| input { | |
| gelf {} | |
| } | |
| output { | |
| elasticsearch { | |
| hosts => "elasticsearch:9200" | |
| } | |
| } |
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
| logstash: | |
| image: docker.elastic.co/logstash/logstash:7.1.1 | |
| depends_on: | |
| - elasticsearch | |
| ports: | |
| - 12201:12201/udp | |
| volumes: | |
| - ./logstash.conf:/usr/share/logstash/pipeline/logstash.conf:ro | |
| networks: | |
| - logging-network |
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
| elasticsearch: | |
| image: docker.elastic.co/elasticsearch/elasticsearch:7.1.1 | |
| environment: | |
| - discovery.type=single-node | |
| - xpack.security.enabled=false | |
| networks: | |
| - logging-network |