Skip to content

Commit 269dfbf

Browse files
authored
Merge pull request #29 from aws-solutions/release/v3.2.0
Release v3.2.0
2 parents bbe90a4 + 2229671 commit 269dfbf

File tree

20 files changed

+5685
-60701
lines changed

20 files changed

+5685
-60701
lines changed

CHANGELOG.md

Lines changed: 59 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,136 @@
11
# Change Log
2+
23
All notable changes to this project will be documented in this file.
34

45
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
56
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
67

7-
## [3.1.2] - 2022-4-19
8+
## [3.2.0] - 2023-05-18
9+
10+
### Changed
11+
12+
- Upgraded to cdk v2
13+
- Added region name and account ID to AppRegistry Application name
14+
- Changed AppRegistry Attribute Group name to Region-StackName
15+
- Updated AppRegistry attribute and tag names
16+
- Upgraded Lambda runtimes to node 16
17+
- Removed application insights
18+
- Enabled bucket versioning
19+
20+
## [3.1.2] - 2023-04-17
821

922
### Changed
10-
- Updated object ownership configuration on the S3 logging bucket.
23+
24+
- Updated object ownership configuration on the S3 logging bucket.
1125

12-
## [3.1.1] - 2022-11-9
26+
## [3.1.1] - 2022-11-09
1327

1428
### Changed
29+
1530
- Added stack name to CachePolicy to make unique name allowing for multiple concurrent stacks
1631
- Added stack name to AppRegistry application name to allow for multiple concurrent stacks
1732

18-
## [3.1.0] - 2022-9-1
33+
## [3.1.0] - 2022-09-01
34+
35+
### Added
1936

20-
### New
2137
- SonarQube properties file: sonar-project.properties
2238
- Added cdk nag rule suppressions
2339
- Added SolutionId tag to resources
2440
- Added Service Catalog AppRegistry configuration and ApplicationInsights
2541

2642
### Changed
43+
2744
- Updated deployment/run-unit-tests.sh to generate unit test coverage reports
2845
- Updated deployment/build-s3-dist.sh to output cdk nag errors
2946
- Disabled versioning on buckets within the CloudFront to S3 construct
3047

31-
### Contributors
32-
* @sandimciin
33-
* @eggoynes
48+
## [3.0.0] - 2022-03-10
3449

35-
## [3.0.0] - 2022-3-10
50+
### Added
3651

37-
### New
3852
- Added Amazon S3 construct to replace AWS MediaStore for storing video segments.
3953
- Amazon S3 request metrics added, including first byte latency, and total latency of each request.
4054

4155
### Changed
56+
4257
- Github repo name changed from live-streaming-on-aws-with-mediastore to live-streaming-on-aws-with-amazon-s3.
4358
- Removed mediastore actions from min_user_iam_deploy.json.
4459
- Updated architecture diagram.
45-
- Changed references to MediaStore in implementation guide to Amazon S3.
60+
- Changed references to MediaStore in implementation guide to Amazon S3.
4661
- Removed CloudWatch MediaStore dashboard.
4762
- Replaced mentions of MediaStore with Amazon S3 where appropriate.
4863
- Package follow-redirects updated to 1.14.8
49-
- Replaced resource urls pointing to MediaStore with Amazon S3 urls.
64+
- Replaced resource urls pointing to MediaStore with Amazon S3 urls.
65+
66+
## [2.1.1] - 2022-01-24
5067

51-
## [2.1.1] - 2022-1-24
68+
### Changed
5269

53-
### Updated
5470
- Follow Redirects updated to 1.14.7
5571
- Updated Type Script unit test
5672
- Architecture diagram updated
5773

5874
## [2.1.0] - 2021-11-12
75+
5976
### Changed
60-
- Added additional permissions for AWS MediaLive IAM Policy. Now has additional CloudWatch, MediaConnect, and MediaStore access.
61-
- Changed "Start MediaLive Channel" CloudFormation option to no by default. This saves money in the case customer did not want MediaLive to start on launch.
77+
78+
- Added additional permissions for AWS MediaLive IAM Policy. Now has additional CloudWatch MediaConnect, and MediaStore access.
79+
- Changed "Start MediaLive Channel" CloudFormation option to no by default. This saves money in the case customer did not want MediaLive to start on launch.
6280

6381
### Fixed
64-
- Add new Permissions to the CloudFormation template that will allow customers to add tags on EML resources.
6582

66-
## [2.0.0] - 2021-9-27
67-
### Added
83+
- Add new Permissions to the CloudFormation template that will allow customers to add tags on EML resources.
84+
85+
## [2.0.0] - 2021-09-27
86+
87+
### Added
88+
6889
- Added new section that explains the minimum IAM permissions a AWS IAM user needs to deploy this CloudFormation template.
6990

7091
### Changed
92+
7193
- The Amazon CloudFront distribution TTL values were modified to 1 second for all http error codes. 403, 404, 405, 500, 501, 503, and 504.
7294
- New Amazon CloudFront cache policy that includes the "Origin" header.
7395
- Updated outdated node.js packages.
7496

7597
### Fixed
98+
7699
- Removed logging of AWS MediaLive input details since they could contain input passwords.
77100
- Fixed the AWS CloudWatch Dashboard url on the CloudFormation output page.
78-
- Removed --silent from npm commands for custom builds to make it so building will not fail silently.
79-
- Readme (https://github.com/awslabs/video-on-demand-on-aws-foundations/issues/12)
101+
- Removed --silent from npm commands for custom builds to make it so building will not fail silently.
102+
- Readme (<https://github.com/awslabs/video-on-demand-on-aws-foundations/issues/12>)
80103

104+
## [1.2.1] - 2021-07-01
81105

82-
## [1.2.1] - 2021-7-1
83106
### Fixed
84-
- Updated CFN template for aws-cloudfront-mediastore CDK.
107+
108+
- Updated CFN template for aws-cloudfront-mediastore CDK.
85109
- MediaStore policy is now retricting to only requests from Amazon CloudFront.
86110
- Updated README.
87111

88-
89112
## [1.2.0] - 2020-12-21
113+
90114
### Added
91-
- Updated the source code to build the CloudFormation template using the AWS CDK
115+
116+
- Updated the source code to build the CloudFormation template using the AWS CDK
92117

93118
## [1.1.1] - 2020-08-17
94-
### Bugfix
119+
120+
### Fixed
121+
95122
- added permissions for the custom resource to create SSM parameter stores.
96-
- resolved https://github.com/awslabs/live-streaming-on-aws-with-mediastore/issues/2
123+
- resolved <https://github.com/awslabs/live-streaming-on-aws-with-mediastore/issues/2>
97124

98125
## [1.1.0] - 2020-06-30
126+
99127
### Added
128+
100129
- Elemental Link as an input option
101130
- changed the MediaLive Encoding segment length from 10 seconds to 4
102131

103132
## [1.0.0] - 2020-04-30
133+
104134
### Added
105-
- CHANGELOG version 1.0.0 release
135+
136+
- CHANGELOG version 1.0.0 release

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
## Code of Conduct
2-
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3-
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
2+
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3+
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
44
[email protected] with any additional questions or comments.

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ If you discover a potential security issue in this project we ask that you notif
5555

5656

5757
## Licensing
58+
5859
See the [LICENSE](https://github.com/aws-solutions/live-streaming-on-aws-with-amazon-s3/blob/mainline/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
5960

6061
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.

NOTICE.txt

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
Live Streaming on AWS with Amazon S3
2-
32
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4-
5-
Licensed under the Apache License, Version 2.0 (the "License");
6-
you may not use this file except in compliance with the License.
7-
You may obtain a copy of the License at
8-
9-
http://www.apache.org/licenses/LICENSE-2.0
10-
11-
Unless required by applicable law or agreed to in writing, software
12-
distributed under the License is distributed on an "AS IS" BASIS,
13-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
See the License for the specific language governing permissions and
15-
limitations under the License.
3+
Licensed under the Apache License Version 2.0 (the "License"). You may not use this file except
4+
in compliance with the License. A copy of the License is located at http://www.apache.org/licenses/
5+
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
6+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the License for the
7+
specific language governing permissions and limitations under the License.
168

179
**********************
1810
THIRD PARTY COMPONENTS
@@ -23,22 +15,15 @@ AWS SDK under the Apache License Version 2.0
2315
AWS CDK under the Apache License Version 2.0
2416
axios under the Massachusetts Institute of Technology (MIT) license
2517
axios-mock-adapter under the Massachusetts Institute of Technology (MIT) license
26-
moment under the Massachusetts Institute of Technology (MIT) license
2718
uuid under the Massachusetts Institute of Technology (MIT) license
2819
jest under the Massachusetts Institute of Technology (MIT) license
2920
requests under the Apache License Version 2.0
3021
Stanford Javascript Crypto Library under the BSD license or under the GNU GPL, version 2.0
3122
chai under the Massachusetts Institute of Technology (MIT) license
3223
mocha under the Massachusetts Institute of Technology (MIT) license
3324
aws-sdk-mock under the Massachusetts Institute of Technology (MIT) license
34-
json-to-pretty-yaml under the Apache License Version 2.0
35-
@aws-cdk/aws-cloudwatch under the Apache License Version 2.0
36-
@aws-cdk/aws-lambda under the Apache License Version 2.0
37-
@aws-cdk/aws-medialive under the Apache License Version 2.0
38-
@aws-cdk/aws-s3 under the Apache License Version 2.0
39-
@aws-cdk/aws-servicecatalogappregistry under the Apache License Version 2.0
40-
@aws-cdk/aws-applicationinsights under the Apache License Version 2.0
41-
@aws-cdk/core under the Apache License Version 2.0
25+
aws-cdk-lib under the Apache License Version 2.0
26+
@aws-cdk/aws-servicecatalogappregistry-alpha under the Apache License Version 2.0
4227
@aws-solutions-constructs/aws-cloudfront-s3 under the Apache License Version 2.0
4328
cdk-nag under the Apache License Version 2.0
4429
source-map-support under the Massachusetts Institute of Technology (MIT) license

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ When deploying this solution you may have a DevOps operator IAM user that deploy
110110
* This project is licensed under the terms of the Apache 2.0 license. See `LICENSE`.
111111

112112

113-
This solution collects anonymous operational metrics to help AWS improve the
113+
This solution collects anonymized operational metrics to help AWS improve the
114114
quality of features of the solution. For more information, including how to disable
115115
this capability, please see the [implementation guide](https://docs.aws.amazon.com/solutions/latest/live-streaming-on-aws-with-amazon-s3/welcome.html).
116116

deployment/build-s3-dist.sh

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
#
33
# This script will perform the following tasks:
44
# 1. Remove any old dist files from previous runs.
5-
# 2. Install dependencies for the cdk-solution-helper; responsible for
6-
# converting standard 'cdk synth' output into solution assets.
7-
# 3. Build and synthesize your CDK project.
8-
# 4. Run the cdk-solution-helper on template outputs and organize
5+
# 2. Build and synthesize your CDK project.
6+
# 3. Run the cdk-solution-helper on template outputs and organize
97
# those outputs into the /global-s3-assets folder.
10-
# 5. Organize source code artifacts into the /regional-s3-assets folder.
11-
# 6. Remove any temporary files used for staging.
8+
# 4. Organize source code artifacts into the /regional-s3-assets folder.
9+
# 5. Remove any temporary files used for staging.
1210
#
1311
# This script should be run from the repo's deployment directory
1412
# cd deployment
15-
# ./build-s3-dist.sh source-bucket-base-name solution-name version-code template-bucket-name
13+
# ./build-s3-dist.sh source-bucket-base-name solution-name version-code
1614
#
1715
# Parameters:
1816
# - source-bucket-base-name: Name for the S3 bucket location where the template will source the Lambda
@@ -54,21 +52,16 @@ mkdir -p $build_dist_dir
5452
rm -rf $staging_dist_dir
5553
mkdir -p $staging_dist_dir
5654

57-
echo "------------------------------------------------------------------------------"
58-
echo "[Init] Install dependencies for the cdk-solution-helper"
59-
echo "------------------------------------------------------------------------------"
60-
cd $template_dir/cdk-solution-helper
61-
npm install --production
62-
6355
echo "------------------------------------------------------------------------------"
6456
echo "[Synth] CDK Project"
6557
echo "------------------------------------------------------------------------------"
66-
# Make sure user has the newest CDK version
67-
npm uninstall -g aws-cdk && npm install -g aws-cdk@1
6858

6959
cd $source_dir/constructs
7060
npm install
71-
cdk synth --output=$staging_dist_dir
61+
62+
npm run cdk -- context --clear
63+
npm run synth -- --output=$staging_dist_dir
64+
7265
if [ $? -ne 0 ]
7366
then
7467
echo "******************************************************************************"

deployment/cdk-solution-helper/index.js

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,53 +13,55 @@
1313

1414
// Imports
1515
const fs = require('fs');
16-
const YAML = require('json-to-pretty-yaml');
16+
const _regex = /[\w]*AssetParameters/g; //this regular express also takes into account lambda functions defined in nested stacks
1717

1818
// Paths
1919
const global_s3_assets = '../global-s3-assets';
2020

21+
const getAllAssetParameterKeys = (parameters) =>
22+
Object.keys(parameters).filter((key) => key.search(_regex) > -1);
2123

2224
// For each template in global_s3_assets ...
23-
fs.readdirSync(global_s3_assets).forEach(file => {
25+
fs.readdirSync(global_s3_assets).forEach((file) => {
2426
// Import and parse template file
2527
const raw_template = fs.readFileSync(`${global_s3_assets}/${file}`);
2628
let template = JSON.parse(raw_template);
2729

2830
// Clean-up Lambda function code dependencies
29-
const resources = (template.Resources) ? template.Resources : {};
31+
const resources = template.Resources ? template.Resources : {};
3032
const lambdaFunctions = Object.keys(resources).filter(function (key) {
3133
return resources[key].Type === 'AWS::Lambda::Function';
3234
});
33-
34-
// Rename lambda Assets to resource name and set the S3 key reference
35-
3635
lambdaFunctions.forEach(function (f) {
37-
const fn = template.Resources[f];
36+
const fn = resources[f];
3837
if (fn.Properties.Code.hasOwnProperty('S3Bucket')) {
3938
// Set the S3 key reference
40-
let artifactHash = Object.assign(fn.Properties.Code.S3Bucket.Ref);
41-
artifactHash = artifactHash.replace('AssetParameters', '');
42-
artifactHash = artifactHash.substring(0, artifactHash.indexOf('S3Bucket'));
39+
let artifactHash = Object.assign(fn.Properties.Code.S3Key);
40+
artifactHash = artifactHash.replace(_regex, '');
41+
artifactHash = artifactHash.substring(
42+
0,
43+
artifactHash.indexOf('.zip')
44+
);
4345
const assetPath = `asset${artifactHash}`;
4446
fn.Properties.Code.S3Key = `%%SOLUTION_NAME%%/%%VERSION%%/${assetPath}.zip`;
45-
4647
// Set the S3 bucket reference
4748
fn.Properties.Code.S3Bucket = {
48-
'Fn::Sub': '%%BUCKET_NAME%%-${AWS::Region}'
49+
'Fn::Sub': '%%BUCKET_NAME%%-${AWS::Region}',
4950
};
51+
// Set the handler
52+
const handler = fn.Properties.Handler;
53+
fn.Properties.Handler = `${assetPath}/${handler}`;
5054
}
5155
});
5256

5357
// Clean-up parameters section
54-
const parameters = (template.Parameters) ? template.Parameters : {};
55-
const assetParameters = Object.keys(parameters).filter(function (key) {
56-
return key.includes('AssetParameters');
57-
});
58+
const parameters = template.Parameters ? template.Parameters : {};
59+
const assetParameters = getAllAssetParameterKeys(parameters);
5860
assetParameters.forEach(function (a) {
5961
template.Parameters[a] = undefined;
6062
});
6163

62-
// Convert modified template to YAML and output to file
63-
const output_template = YAML.stringify(template);
64+
// Output modified template file
65+
const output_template = JSON.stringify(template, null, 2);
6466
fs.writeFileSync(`${global_s3_assets}/${file}`, output_template);
65-
});
67+
});

0 commit comments

Comments
 (0)