Skip to content
This repository was archived by the owner on Dec 30, 2024. It is now read-only.

Commit d130b94

Browse files
authored
Merge pull request #43 from aws-solutions/feature/v1.6.0
Release v1.6.0 changes
2 parents 345afea + 31cd58d commit d130b94

File tree

186 files changed

+17015
-10619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+17015
-10619
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,5 @@ dmypy.json
272272
.pytype/
273273
source/lambda/wf_publish_topic_model/test/fixtures/output/doc-topics.csv
274274
source/lambda/wf_publish_topic_model/test/fixtures/output/topic-terms.csv
275+
276+
.idea/

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.6.0] - 2021-09-27
9+
10+
### Added
11+
12+
- Capability to ingest YouTube comments
13+
14+
### Updated
15+
16+
- AWS CDK version to 1.121.0
17+
- AWS SDK version to 2.991.0
18+
- Updated Amazon QuickSight analysis and dashboard to reflect the new ingestion source
19+
820
## [1.5.0] - 2021-07-22
921

1022
### Added

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The Discovering Hot Topics Using Machine Learning solution helps you identify the most dominant topics associated with your products, policies, events, and brands. Implementing this solution helps you react quickly to new growth opportunities, address negative brand associations, and deliver higher levels of customer satisfaction.
44

5-
The solution automates digital asset (text and image) ingestion from twitter and RSS news feeds to provide near-real-time inferences using machine learning algorithms through Amazon Comprehend, Amazon Translate, and Amazon Rekognition to perform topic modeling, sentiment analysis, entity and key phrase detection, and detect any unsafe images. The solution then visualizes these large-scale customer analyses using an Amazon QuickSight dashboard. This guide provides step-by-step instructions for deploying this solution including a pre-built dashboard that provides you with the context and insights necessary to identify trends that help or harm your brand.
5+
The solution automates digital asset (text and image) ingestion from twitter, RSS news feeds, and YouTube comments to provide near-real-time inferences using machine learning algorithms through Amazon Comprehend, Amazon Translate, and Amazon Rekognition to perform topic modeling, sentiment analysis, entity and key phrase detection, and detect any unsafe images. The solution then visualizes these large-scale customer analyses using an Amazon QuickSight dashboard. This guide provides step-by-step instructions for deploying this solution including a pre-built dashboard that provides you with the context and insights necessary to identify trends that help or harm your brand.
66

77
The solution performs the following key features:
88

@@ -11,7 +11,7 @@ The solution performs the following key features:
1111
- **Determines if images associated with your brand contain unsafe content**: detects unsafe and negative imagery in content
1212
- **Helps customers identify insights in near real-time**: you can use a visualization dashboard to better understand context, threats, and opportunities almost instantly
1313

14-
This solution deploys an AWS CloudFormation template that supports both Twitter and RSS feeds as data source options for ingestion, but the solution can be customized to aggregate other social media platforms and internal enterprise systems.
14+
This solution deploys an AWS CloudFormation template that supports Twitter, RSS feeds, and YouTube comments as data source options for ingestion, but the solution can be customized to aggregate other social media platforms and internal enterprise systems.
1515

1616
For a detailed solution deployment guide, refer to [Discovering Hot Topics using Machine Learning](https://aws.amazon.com/solutions/implementations/discovering-hot-topics-using-machine-learning)
1717

@@ -33,7 +33,7 @@ Deploying this solution with the default parameters builds the following environ
3333

3434
The architecture of the solution includes the following key components and workflows:
3535

36-
1. Ingestion – Social media and RSS feed ingestion and management using Lambda functions, Amazon DynamoDB, and Amazon CloudWatch Event Scheduler.
36+
1. Ingestion – Twitter, RSS feeds, and YouTube comments ingestion and management using Lambda functions, Amazon DynamoDB, and Amazon CloudWatch Event Scheduler. For detailed reference architecture diagrams for Twitter, YouTube comment, and RSS news feed ingestion, refer to the [implementation guide](https://docs.aws.amazon.com/solutions/latest/discovering-hot-topics-using-machine-learning/overview.html).
3737

3838
2. Data Stream — The data is buffered through Amazon Kinesis Data Streams to provide resiliency and throttle incoming requests. The Data Streams have a configured DLQ to catch any errors in processing feeds.
3939

@@ -78,15 +78,17 @@ The solution is deployed using a CloudFormation template with a lambda backed cu
7878
├── bin [entrypoint of the CDK application]
7979
├── lambda [folder containing source code the lambda functions]
8080
│ ├── capture_news_feed [lambda function to ingest news feeds]
81+
│ ├── create-partition [lambda function to create glue partitions]
8182
│   ├── firehose_topic_proxy [lambda function to write topic analysis output to Amazon Kinesis Firehose]
8283
│   ├── firehose-text-proxy [lambda function to write text analysis output to Amazon Kinesis Firehose]
8384
│   ├── ingestion-consumer [lambda function that consumes messages from Amazon Kinesis Data Stream]
8485
│   ├── ingestion-producer [lambda function that makes Twitter API call and pushes data to Amazon Kinesis Data Stream]
86+
│   ├── ingestion-youtube [lambda function that ingests comments from YouTube videos and pushes data to Amazon Kinesis Data Stream]
8587
│   ├── integration [lambda function that publishes inference outputs to Amazon Events Bridge]
86-
│ ├── layers [lambda layer function library]
87-
│ │ ├── aws-nodesk-custom-config
88+
│ ├── layers [lambda layer function library for Node and Python layers]
89+
│ │ ├── aws-nodesdk-custom-config
90+
│ │ ├── python_lambda_layer
8891
│ ├── quicksight-custom-resources [lambda function to create Amazon QuickSight resources, example: data source, data sets, analysis and dashboards]
89-
│ ├── shared [lambda layer function library (specific to python lambda runtimes)]
9092
│ ├── solution_helper [lambda function that allows capturing metrics for this solution]
9193
│   ├── storage-firehose-processor [lambda function that writes data to S3 buckets to build a relational model]
9294
│   ├── wf-analyze-text [lambda function to detect sentiments, key phrases and entities using Amazon Comprehend]

source/bin/discovering-hot-topics-app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ const dht = new DiscoveringHotTopicsStack(app, 'discovering-hot-topics-using-mac
2222
description: `(${app.node.tryGetContext('solution_id')}) - Discovering Hot Topics using Machine Learning. Version %%VERSION%%`
2323
});
2424

25-
app.node.applyAspect(new ApplytoLambda(dht, 'CustomConfig'));
25+
cdk.Aspects.of(app).add(new ApplytoLambda(dht, 'CustomConfig'));

source/images/architecture.png

-9.74 KB
Loading

source/lambda/capture_news_feed/.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[run]
22
omit =
3+
charset_normalizer/*
34
*certifi/*
45
*chardet/*
56
feedparser.py

source/lambda/capture_news_feed/lambda_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import json
1616
import os
1717

18-
from dht_config import custom_boto_config, custom_logging
18+
from shared_util import custom_boto_config, custom_logging
1919

2020
from util import config_helper, ddb_helper, event_bus_helper
2121
from util.ddb_helper import get_query_tracker
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
moto==2.0.0
2-
pytest==6.2.2
3-
pytest-cov==2.11.1
4-
botocore
1+
moto==2.2.2
2+
pytest==6.2.4
3+
pytest-cov==2.12.1
4+
botocore
5+
mock==4.0.3

source/lambda/capture_news_feed/test/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import boto3
1818
import pytest
1919
from botocore.stub import Stubber
20-
from dht_config import custom_boto_config
2120
from moto.dynamodb2 import mock_dynamodb2
21+
from shared_util import custom_boto_config
2222

2323

2424
@pytest.fixture(autouse=True)

source/lambda/capture_news_feed/test/fixtures/event_bus_fixture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
@pytest.fixture()
2222
def get_event_bus_stubber():
2323
global event_bus_stubber
24-
from util.helper import get_service_client
24+
from shared_util.service_helper import get_service_client
2525

2626
if not event_bus_stubber:
2727
event_bus_client = get_service_client("events")

0 commit comments

Comments
 (0)