Skip to content

Commit 4ace285

Browse files
committed
Release v2.1.2
1 parent 8174818 commit 4ace285

28 files changed

+2212
-3143
lines changed

Diff for: CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ 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+
## [2.1.2] - 2023-10-19
9+
10+
### Changed
11+
12+
* Upgraded to Media Insights on AWS v5.1.4
13+
* Consolidated policy statements into one S3 bucket policy for the website bucket
14+
* Updated instructions in README to opt out of metric reporting
15+
* Updated all Lambda functions Python Runtime version to 3.11
16+
817
## [2.1.1] - 2023-07-13
918

1019
### Changed

Diff for: NOTICE

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ botocore under the Apache License Version 2.0
2525
cfn-lint under the Massachusetts Institute of Technology license
2626
cfnresponse under the Apache License Version 2.0
2727
chalice under the Apache License Version 2.0
28-
char.js under the Massachusetts Institute of Technology license
28+
chart.js under the Massachusetts Institute of Technology license
2929
diff under the BSD with attribution (BSD-3) license
3030
dropzone under the Massachusetts Institute of Technology license
3131
elasticsearch-py under the Apache License Version 2.0
@@ -37,11 +37,11 @@ number-to-words under the Massachusetts Institute of Technology license
3737
pytest under the Massachusetts Institute of Technology license
3838
register-service-worker under the Massachusetts Institute of Technology license
3939
requests under the Apache License Version 2.0
40-
requests_aws4auth under the Massachusetts Institute of Technology license
40+
requests-aws4auth under the Massachusetts Institute of Technology license
4141
routerjs under the Massachusetts Institute of Technology license
4242
selenium under the Apache License Version 2.0
4343
urllib3 under the Massachusetts Institute of Technology license
44-
videojs under the Apache License Version 2.0
44+
video.js under the Apache License Version 2.0
4545
videojs-flash under the Apache License Version 2.0
4646
videojs-hotkeys under the Apache License Version 2.0
4747
videojs-markers under the Massachusetts Institute of Technology license
@@ -51,5 +51,5 @@ vue-highlightjs under the Massachusetts Institute of Technology license
5151
vue-router under the Massachusetts Institute of Technology license
5252
vuex under the Massachusetts Institute of Technology license
5353
vuex-persistedstate under the Massachusetts Institute of Technology license
54-
wavesurfer.js under the Creative Commons Attribution 3.0 Unported License
55-
webdriver_manager under the Apache License Version 2.0
54+
wavesurfer.js under the BSD with attribution (BSD-3) license
55+
webdriver-manager under the Apache License Version 2.0

Diff for: README.md

+43-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[![scheduled-workflow](https://github.com/aws-solutions/content-localization-on-aws/actions/workflows/scheduled-workflow.yml/badge.svg)](https://github.com/aws-solutions/content-localization-on-aws/actions/workflows/scheduled-workflow.yml)
2-
3-
41
# Content Localization on AWS
52

63
Welcome to the Content Localization on AWS project! This project will help you extend the reach of your VOD content by quickly and efficiently creating accurate multi-language subtitles using AWS AI Services. You can make manual corrections to the automatically created subtitles and use advanced AWS AI Service customization features to improve the results of the automation for your content domain. Content Localization is built on [Media Insights on AWS](https://github.com/aws-solutions/media-insights-on-aws), a framework that helps accelerate the development of serverless applications that process video, images, audio, and text with artificial intelligence services and multimedia services on AWS.
@@ -326,7 +323,7 @@ aws s3 rb s3://<bucket-name> --force
326323

327324
This solution collects anonymized operational metrics to help AWS improve the
328325
quality of features of the solution. For more information, including how to disable
329-
this capability, please see the [implementation guide](https://docs.aws.amazon.com/solutions/latest/content-localization-on-aws/operational-metrics.html).
326+
this capability, please see the [implementation guide](https://docs.aws.amazon.com/solutions/latest/content-localization-on-aws/reference.html#anonymized-data-collection).
330327

331328
When enabled, the following information is collected and sent to AWS:
332329

@@ -350,7 +347,7 @@ Example data:
350347
}
351348
```
352349

353-
To opt out of this reporting, edit [deployment/content-localization-on-aws.yaml](deployment/content-localization-on-aws.yaml) and change `AnonymizedData` in the `Mappings` section from:
350+
To opt out of this reporting on the Content Localization on AWS stack, edit [deployment/content-localization-on-aws.yaml](deployment/content-localization-on-aws.yaml) and change `AnonymizedData` in the `Mappings` section from:
354351

355352
```
356353
AnonymizedData:
@@ -366,6 +363,47 @@ AnonymizedData:
366363
Data: "No"
367364
```
368365

366+
To opt out of this reporting on the nested Media Insights on AWS stack, do one of the following options:
367+
368+
### *Option 1:* Deploy Media Insights on AWS separately with metric reporting disabled
369+
370+
1. Follow the instructions to disable metric reporting in the [Anonymized Data Collection](https://docs.aws.amazon.com/solutions/latest/media-insights-on-aws/reference.html#anonymized-data-collection) section of the Media Insights on AWS implementation guide, then deploy the solution
371+
2. Follow the instructions to [Install Content Localization on AWS over an existing Media Insights on AWS stack](#option-1-install-content-localization-on-aws-over-an-existing-media-insights-on-aws-stack)
372+
373+
### *Option 2:* Modify the source template that is used to deploy Media Insights on AWS as a nested stack
374+
375+
1. Download the Media Insights on AWS template from `https://solutions-reference.s3.amazonaws.com/media-insights-on-aws/<version>/media-insights-on-aws-stack.template` and replace `<version>` to get the specific Media Insights on AWS version you would like to deploy
376+
2. Follow the instructions to disable metric reporting in the [Anonymized Data Collection](https://docs.aws.amazon.com/solutions/latest/media-insights-on-aws/reference.html#anonymized-data-collection) section of the Media Insights on AWS implementation guide, but do not deploy this template
377+
3. Upload the template to an S3 bucket
378+
4. Edit [deployment/content-localization-on-aws.yaml](deployment/content-localization-on-aws.yaml) and change `TemplateURL` within the `MieStack` properties to point to the template you've uploaded to S3
379+
380+
from
381+
382+
```
383+
MieStack:
384+
Type: "AWS::CloudFormation::Stack"
385+
Properties:
386+
TemplateURL: !Join
387+
- ""
388+
- - "https://solutions-reference.s3.amazonaws.com/media-insights-on-aws/"
389+
- !FindInMap
390+
- MediaInsights
391+
- Release
392+
- Version
393+
- "/media-insights-on-aws-stack.template"
394+
```
395+
396+
to
397+
398+
```
399+
MieStack:
400+
Type: "AWS::CloudFormation::Stack"
401+
Properties:
402+
TemplateURL: "<new url>"
403+
```
404+
405+
5. Use the instructions in previous sections to [build](#building-the-solution-from-source-code) and [deploy](#option-2-install-content-localization-on-aws-with-a-new-media-insights-on-aws-stack) Content Localization on AWS
406+
369407
# Help
370408
371409
Join our Gitter chat at https://gitter.im/awslabs/aws-media-insights-engine. This public chat forum was created to foster communication between Media Insights on AWS developers worldwide.

Diff for: deployment/build-s3-dist.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,11 @@ cp "./dist/websitehelper.zip" "$regional_dist_dir/websitehelper.zip"
306306
rm -rf dist
307307

308308
echo "------------------------------------------------------------------------------"
309-
echo "Creating deployment package for anonymous data logger"
309+
echo "Creating deployment package for anonymized data logger"
310310
echo "------------------------------------------------------------------------------"
311311

312-
echo "Building anonymous data logger"
313-
cd "$source_dir/anonymous-data-logger" || exit 1
312+
echo "Building anonymized data logger"
313+
cd "$source_dir/anonymized-data-logger" || exit 1
314314
[ -e dist ] && rm -rf dist
315315
mkdir -p dist
316316
[ -e package ] && rm -rf package
@@ -325,14 +325,14 @@ echo "[install]" > ./setup.cfg
325325
echo "prefix= " >> ./setup.cfg
326326
pip3 install --quiet -r ../requirements.txt --target .
327327
cp -R ../lib .
328-
if ! [ -d ../dist/anonymous-data-logger.zip ]; then
329-
zip -q -r9 ../dist/anonymous-data-logger.zip .
330-
elif [ -d ../dist/anonymous-data-logger.zip ]; then
328+
if ! [ -d ../dist/anonymized-data-logger.zip ]; then
329+
zip -q -r9 ../dist/anonymized-data-logger.zip .
330+
elif [ -d ../dist/anonymized-data-logger.zip ]; then
331331
echo "Package already present"
332332
fi
333333
popd || exit 1
334-
zip -q -g -9 ./dist/anonymous-data-logger.zip ./anonymous-data-logger.py
335-
cp "./dist/anonymous-data-logger.zip" "$regional_dist_dir/anonymous-data-logger.zip"
334+
zip -q -g -9 ./dist/anonymized-data-logger.zip ./anonymized-data-logger.py
335+
cp "./dist/anonymized-data-logger.zip" "$regional_dist_dir/anonymized-data-logger.zip"
336336

337337
# Clean up the build directories
338338
rm -rf dist

Diff for: deployment/content-localization-on-aws-auth.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: "2010-09-09"
2-
Description: "Content Localization on AWS %%VERSION%% - user authentication infrastructure"
2+
Description: "Content Localization on AWS user authentication infastructure %%VERSION%%"
33

44
Parameters:
55
AdminEmail:
@@ -92,7 +92,7 @@ Resources:
9292
- - index
9393
- .handler
9494
Role: !GetAtt CognitoRoleMapperLambdaExecutionRole.Arn
95-
Runtime: python3.7
95+
Runtime: python3.11
9696
Timeout: 30
9797

9898
CognitoRoleMapperLambdaExecutionRole:

Diff for: deployment/content-localization-on-aws-opensearch.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: "2010-09-09"
2-
Description: "Content Localization on AWS %%VERSION%% - Opensearch Consumer stack"
2+
Description: "Content Localization on AWS Opensearch consumer stack %%VERSION%%"
33

44
Parameters:
55
NodeType:
@@ -92,7 +92,7 @@ Resources:
9292
"esconsumer.zip",
9393
],
9494
]
95-
Runtime: "python3.7"
95+
Runtime: "python3.11"
9696
Timeout: 900
9797
MemorySize: 2048
9898
Environment:

Diff for: deployment/content-localization-on-aws-use-existing-mie-stack.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: "2010-09-09"
2-
Description: "(SO0164) Content Localization on AWS Version %%VERSION%% - Deploys the Content Localization on AWS Application over an existing Media Insights on AWS stack."
2+
Description: "(SO0164) Content Localization on AWS using an existing Media Insights on AWS stack %%VERSION%%"
33

44
Parameters:
55
MieStackName:

Diff for: deployment/content-localization-on-aws-video-workflow.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: "2010-09-09"
2-
Description: "Content Localization on AWS %%VERSION%% - Deploys video processing workflow"
2+
Description: "Content Localization on AWS video processing workflow %%VERSION%%"
33

44
Parameters:
55
WorkflowCustomResourceArn:

Diff for: deployment/content-localization-on-aws-web.yaml

+13-19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: "2010-09-09"
2-
Description: "Content Localization on AWS %%VERSION%% - Deploys the Content Localization on AWS website resources"
2+
Description: "Content Localization on AWS website resources %%VERSION%%"
33

44
Parameters:
55
DataplaneEndpoint:
@@ -47,7 +47,7 @@ Resources:
4747
response_data = {'Data': stack_name.lower() + '-website'}
4848
cfnresponse.send(event, context, cfnresponse.SUCCESS, response_data, "CustomResourcePhysicalID")
4949
Handler: index.handler
50-
Runtime: python3.8
50+
Runtime: python3.11
5151
Role: !GetAtt WebsiteBucketNameExecutionRole.Arn
5252

5353
WebsiteBucketNameFunctionPermissions:
@@ -121,22 +121,6 @@ Resources:
121121
AbortIncompleteMultipartUpload:
122122
DaysAfterInitiation: 1
123123

124-
WebBucketPolicy:
125-
Type: AWS::S3::BucketPolicy
126-
Properties:
127-
Bucket: !Ref ContentAnalysisWebsiteBucket
128-
PolicyDocument:
129-
Statement:
130-
- Effect: Deny
131-
Principal: "*"
132-
Action: "*"
133-
Resource:
134-
- !Sub "arn:aws:s3:::${ContentAnalysisWebsiteBucket}/*"
135-
- !Sub "arn:aws:s3:::${ContentAnalysisWebsiteBucket}"
136-
Condition:
137-
Bool:
138-
aws:SecureTransport: false
139-
140124
CopyWebSource:
141125
DependsOn: ContentAnalysisWebsiteBucket
142126
Type: Custom::WebsiteDeployHelper
@@ -171,6 +155,15 @@ Resources:
171155
- !Sub "arn:aws:s3:::${ContentAnalysisWebsiteBucket}/*"
172156
Principal:
173157
CanonicalUser: !GetAtt ContentAnalysisOriginAccessIdentity.S3CanonicalUserId
158+
- Effect: Deny
159+
Principal: "*"
160+
Action: "*"
161+
Resource:
162+
- !Sub "arn:aws:s3:::${ContentAnalysisWebsiteBucket}/*"
163+
- !Sub "arn:aws:s3:::${ContentAnalysisWebsiteBucket}"
164+
Condition:
165+
Bool:
166+
aws:SecureTransport: false
174167

175168
WebsiteDistribution:
176169
Type: AWS::CloudFront::Distribution
@@ -293,7 +286,7 @@ Resources:
293286
Handler: website_helper.lambda_handler
294287
MemorySize: 256
295288
Role: !GetAtt WebsiteHelperRole.Arn
296-
Runtime: python3.9
289+
Runtime: python3.11
297290
Timeout: 900
298291
Environment:
299292
Variables:
@@ -305,6 +298,7 @@ Resources:
305298
IdentityPoolId: !Ref IdentityPoolId
306299
AwsRegion: !Ref AWS::Region
307300
PoolClientId: !Ref PoolClientId
301+
botoConfig: '{"user_agent_extra": "AwsSolution/SO0164/%%VERSION%%"}'
308302

309303
Outputs:
310304
CloudfrontUrl:

Diff for: deployment/content-localization-on-aws.yaml

+20-21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AWSTemplateFormatVersion: "2010-09-09"
2-
Description: "(SO0164) Content Localization on AWS Version %%VERSION%% - Deploys the Content Localization on AWS Application"
2+
Description: "(SO0164) Content Localization on AWS %%VERSION%%"
33

44
Parameters:
55
AdminEmail:
@@ -24,7 +24,7 @@ Conditions:
2424
Mappings:
2525
MediaInsights:
2626
Release:
27-
Version: "v5.1.1"
27+
Version: "v5.1.4"
2828
Application:
2929
SourceCode:
3030
GlobalS3Bucket: "%%GLOBAL_BUCKET_NAME%%"
@@ -61,7 +61,6 @@ Resources:
6161
DeployTestResources: "No"
6262
MaxConcurrentWorkflows: 5
6363
EnableXrayTrace: "Yes"
64-
SendAnonymousData: !FindInMap [AnonymizedData,SendAnonymizedData,Data]
6564
SolutionId: SO0164
6665
SolutionVersion: "%%VERSION%%"
6766

@@ -169,7 +168,7 @@ Resources:
169168
- MieStack
170169
- Outputs.OperatorLibraryStack
171170

172-
AnonymousDataCustomResourceRole:
171+
AnonymizedDataCustomResourceRole:
173172
Type: AWS::IAM::Role
174173
Properties:
175174
AssumeRolePolicyDocument:
@@ -185,7 +184,7 @@ Resources:
185184
Path: "/"
186185
Policies:
187186
-
188-
PolicyName: !Sub "${AWS::StackName}-anonymous-data-logger"
187+
PolicyName: !Sub "${AWS::StackName}-anonymized-data-logger"
189188
PolicyDocument:
190189
Statement:
191190
-
@@ -203,7 +202,7 @@ Resources:
203202
Resource:
204203
- !Join ["", ["arn:aws:ssm:", Ref: "AWS::Region", ":", Ref: "AWS::AccountId", ":parameter/*"]]
205204

206-
AnonymousDataCustomResource:
205+
AnonymizedDataCustomResource:
207206
Type: AWS::Lambda::Function
208207
Metadata:
209208
cfn_nag:
@@ -213,32 +212,32 @@ Resources:
213212
- id: W92
214213
reason: "This function does not require performance optimization, so the default concurrency limits suffice."
215214
Properties:
216-
FunctionName: !Sub ${AWS::StackName}-anonymous-data
217-
Description: Used to send anonymous data
218-
Handler: anonymous-data-logger.handler
219-
Role: !GetAtt AnonymousDataCustomResourceRole.Arn
215+
FunctionName: !Sub ${AWS::StackName}-anonymized-data
216+
Description: Used to send anonymized data
217+
Handler: anonymized-data-logger.handler
218+
Role: !GetAtt AnonymizedDataCustomResourceRole.Arn
220219
Code:
221220
S3Bucket: !Join [ "-", [ !FindInMap [ "Application", "SourceCode", "RegionalS3Bucket" ], Ref: "AWS::Region" ] ]
222-
S3Key: !Join [ "/", [ !FindInMap [ "Application", "SourceCode", "CodeKeyPrefix" ], "anonymous-data-logger.zip" ] ]
223-
Runtime: python3.8
221+
S3Key: !Join [ "/", [ !FindInMap [ "Application", "SourceCode", "CodeKeyPrefix" ], "anonymized-data-logger.zip" ] ]
222+
Runtime: python3.11
224223
Timeout: 180
225224

226-
# SendAnonymousData
227-
AnonymousDataUuid:
225+
# SendAnonymizedData
226+
AnonymizedDataUuid:
228227
Condition: EnableAnonymizedData
229228
Type: "Custom::UUID"
230229
Properties:
231-
ServiceToken: !GetAtt AnonymousDataCustomResource.Arn
230+
ServiceToken: !GetAtt AnonymizedDataCustomResource.Arn
232231
Resource: UUID
233232

234-
AnonymousMetric:
233+
AnonymizedMetric:
235234
Condition: EnableAnonymizedData
236-
Type: "Custom::AnonymousMetric"
235+
Type: "Custom::AnonymizedMetric"
237236
Properties:
238-
ServiceToken: !GetAtt AnonymousDataCustomResource.Arn
239-
Resource: AnonymousMetric
240-
SolutionId: "SO0042"
241-
UUID: !GetAtt AnonymousDataUuid.UUID
237+
ServiceToken: !GetAtt AnonymizedDataCustomResource.Arn
238+
Resource: AnonymizedMetric
239+
SolutionId: "SO0164"
240+
UUID: !GetAtt AnonymizedDataUuid.UUID
242241
Version: !FindInMap ["Application", "SourceCode", "Version"]
243242

244243
# AppRegistry

Diff for: source/anonymous-data-logger/anonymous-data-logger.py renamed to source/anonymized-data-logger/anonymized-data-logger.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
##############################################################################
1717
#
1818
# PURPOSE:
19-
# This function sends anonymous performance data to the AWS
20-
# Solutions metrics API. This information is anonymous and helps improve the
19+
# This function sends anonymized performance data to the AWS
20+
# Solutions metrics API. This information is anonymized and helps improve the
2121
# quality of the solution.
2222
#
2323
##############################################################################
@@ -48,7 +48,7 @@ def handler(event, context):
4848
response_data = {'UUID': str(uuid.uuid4())}
4949
unique_id = response_data['UUID']
5050
cfn.send(event, context, 'SUCCESS', response_data, unique_id)
51-
elif resource == 'AnonymousMetric':
51+
elif resource == 'AnonymizedMetric':
5252
Metrics.send_metrics(config)
5353
unique_id = 'Metrics Sent'
5454
cfn.send(event, context, 'SUCCESS', response_data, unique_id)

Diff for: source/anonymized-data-logger/requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
requests
2+
urllib3==1.26.18

Diff for: source/anonymous-data-logger/requirements.txt

-2
This file was deleted.

0 commit comments

Comments
 (0)