Skip to content

Commit

Permalink
Merge pull request #29 from aws-solutions/release/v3.2.0
Browse files Browse the repository at this point in the history
Release v3.2.0
  • Loading branch information
dch90 authored May 24, 2023
2 parents bbe90a4 + 2229671 commit 269dfbf
Show file tree
Hide file tree
Showing 20 changed files with 5,685 additions and 60,701 deletions.
87 changes: 59 additions & 28 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,105 +1,136 @@
# Change Log

All notable changes to this project will be documented in this file.

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

## [3.1.2] - 2022-4-19
## [3.2.0] - 2023-05-18

### Changed

- Upgraded to cdk v2
- Added region name and account ID to AppRegistry Application name
- Changed AppRegistry Attribute Group name to Region-StackName
- Updated AppRegistry attribute and tag names
- Upgraded Lambda runtimes to node 16
- Removed application insights
- Enabled bucket versioning

## [3.1.2] - 2023-04-17

### Changed
- Updated object ownership configuration on the S3 logging bucket.

- Updated object ownership configuration on the S3 logging bucket.

## [3.1.1] - 2022-11-9
## [3.1.1] - 2022-11-09

### Changed

- Added stack name to CachePolicy to make unique name allowing for multiple concurrent stacks
- Added stack name to AppRegistry application name to allow for multiple concurrent stacks

## [3.1.0] - 2022-9-1
## [3.1.0] - 2022-09-01

### Added

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

### Changed

- Updated deployment/run-unit-tests.sh to generate unit test coverage reports
- Updated deployment/build-s3-dist.sh to output cdk nag errors
- Disabled versioning on buckets within the CloudFront to S3 construct

### Contributors
* @sandimciin
* @eggoynes
## [3.0.0] - 2022-03-10

## [3.0.0] - 2022-3-10
### Added

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

### Changed

- Github repo name changed from live-streaming-on-aws-with-mediastore to live-streaming-on-aws-with-amazon-s3.
- Removed mediastore actions from min_user_iam_deploy.json.
- Updated architecture diagram.
- Changed references to MediaStore in implementation guide to Amazon S3.
- Changed references to MediaStore in implementation guide to Amazon S3.
- Removed CloudWatch MediaStore dashboard.
- Replaced mentions of MediaStore with Amazon S3 where appropriate.
- Package follow-redirects updated to 1.14.8
- Replaced resource urls pointing to MediaStore with Amazon S3 urls.
- Replaced resource urls pointing to MediaStore with Amazon S3 urls.

## [2.1.1] - 2022-01-24

## [2.1.1] - 2022-1-24
### Changed

### Updated
- Follow Redirects updated to 1.14.7
- Updated Type Script unit test
- Architecture diagram updated

## [2.1.0] - 2021-11-12

### Changed
- Added additional permissions for AWS MediaLive IAM Policy. Now has additional CloudWatch, MediaConnect, and MediaStore access.
- 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.

- Added additional permissions for AWS MediaLive IAM Policy. Now has additional CloudWatch MediaConnect, and MediaStore access.
- 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.

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

## [2.0.0] - 2021-9-27
### Added
- Add new Permissions to the CloudFormation template that will allow customers to add tags on EML resources.

## [2.0.0] - 2021-09-27

### Added

- Added new section that explains the minimum IAM permissions a AWS IAM user needs to deploy this CloudFormation template.

### Changed

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

### Fixed

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

## [1.2.1] - 2021-07-01

## [1.2.1] - 2021-7-1
### Fixed
- Updated CFN template for aws-cloudfront-mediastore CDK.

- Updated CFN template for aws-cloudfront-mediastore CDK.
- MediaStore policy is now retricting to only requests from Amazon CloudFront.
- Updated README.


## [1.2.0] - 2020-12-21

### Added
- Updated the source code to build the CloudFormation template using the AWS CDK

- Updated the source code to build the CloudFormation template using the AWS CDK

## [1.1.1] - 2020-08-17
### Bugfix

### Fixed

- added permissions for the custom resource to create SSM parameter stores.
- resolved https://github.com/awslabs/live-streaming-on-aws-with-mediastore/issues/2
- resolved <https://github.com/awslabs/live-streaming-on-aws-with-mediastore/issues/2>

## [1.1.0] - 2020-06-30

### Added

- Elemental Link as an input option
- changed the MediaLive Encoding segment length from 10 seconds to 4

## [1.0.0] - 2020-04-30

### Added
- CHANGELOG version 1.0.0 release

- CHANGELOG version 1.0.0 release
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
opensource-codeofconduct@amazon.com with any additional questions or comments.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ If you discover a potential security issue in this project we ask that you notif


## Licensing

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.

We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
29 changes: 7 additions & 22 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
Live Streaming on AWS with Amazon S3

Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Licensed under the Apache License Version 2.0 (the "License"). You may not use this file except
in compliance with the License. A copy of the License is located at http://www.apache.org/licenses/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied. See the License for the
specific language governing permissions and limitations under the License.

**********************
THIRD PARTY COMPONENTS
Expand All @@ -23,22 +15,15 @@ AWS SDK under the Apache License Version 2.0
AWS CDK under the Apache License Version 2.0
axios under the Massachusetts Institute of Technology (MIT) license
axios-mock-adapter under the Massachusetts Institute of Technology (MIT) license
moment under the Massachusetts Institute of Technology (MIT) license
uuid under the Massachusetts Institute of Technology (MIT) license
jest under the Massachusetts Institute of Technology (MIT) license
requests under the Apache License Version 2.0
Stanford Javascript Crypto Library under the BSD license or under the GNU GPL, version 2.0
chai under the Massachusetts Institute of Technology (MIT) license
mocha under the Massachusetts Institute of Technology (MIT) license
aws-sdk-mock under the Massachusetts Institute of Technology (MIT) license
json-to-pretty-yaml under the Apache License Version 2.0
@aws-cdk/aws-cloudwatch under the Apache License Version 2.0
@aws-cdk/aws-lambda under the Apache License Version 2.0
@aws-cdk/aws-medialive under the Apache License Version 2.0
@aws-cdk/aws-s3 under the Apache License Version 2.0
@aws-cdk/aws-servicecatalogappregistry under the Apache License Version 2.0
@aws-cdk/aws-applicationinsights under the Apache License Version 2.0
@aws-cdk/core under the Apache License Version 2.0
aws-cdk-lib under the Apache License Version 2.0
@aws-cdk/aws-servicecatalogappregistry-alpha under the Apache License Version 2.0
@aws-solutions-constructs/aws-cloudfront-s3 under the Apache License Version 2.0
cdk-nag under the Apache License Version 2.0
source-map-support under the Massachusetts Institute of Technology (MIT) license
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ When deploying this solution you may have a DevOps operator IAM user that deploy
* This project is licensed under the terms of the Apache 2.0 license. See `LICENSE`.


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

25 changes: 9 additions & 16 deletions deployment/build-s3-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
#
# This script will perform the following tasks:
# 1. Remove any old dist files from previous runs.
# 2. Install dependencies for the cdk-solution-helper; responsible for
# converting standard 'cdk synth' output into solution assets.
# 3. Build and synthesize your CDK project.
# 4. Run the cdk-solution-helper on template outputs and organize
# 2. Build and synthesize your CDK project.
# 3. Run the cdk-solution-helper on template outputs and organize
# those outputs into the /global-s3-assets folder.
# 5. Organize source code artifacts into the /regional-s3-assets folder.
# 6. Remove any temporary files used for staging.
# 4. Organize source code artifacts into the /regional-s3-assets folder.
# 5. Remove any temporary files used for staging.
#
# This script should be run from the repo's deployment directory
# cd deployment
# ./build-s3-dist.sh source-bucket-base-name solution-name version-code template-bucket-name
# ./build-s3-dist.sh source-bucket-base-name solution-name version-code
#
# Parameters:
# - source-bucket-base-name: Name for the S3 bucket location where the template will source the Lambda
Expand Down Expand Up @@ -54,21 +52,16 @@ mkdir -p $build_dist_dir
rm -rf $staging_dist_dir
mkdir -p $staging_dist_dir

echo "------------------------------------------------------------------------------"
echo "[Init] Install dependencies for the cdk-solution-helper"
echo "------------------------------------------------------------------------------"
cd $template_dir/cdk-solution-helper
npm install --production

echo "------------------------------------------------------------------------------"
echo "[Synth] CDK Project"
echo "------------------------------------------------------------------------------"
# Make sure user has the newest CDK version
npm uninstall -g aws-cdk && npm install -g aws-cdk@1

cd $source_dir/constructs
npm install
cdk synth --output=$staging_dist_dir

npm run cdk -- context --clear
npm run synth -- --output=$staging_dist_dir

if [ $? -ne 0 ]
then
echo "******************************************************************************"
Expand Down
40 changes: 21 additions & 19 deletions deployment/cdk-solution-helper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,53 +13,55 @@

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

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

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

// For each template in global_s3_assets ...
fs.readdirSync(global_s3_assets).forEach(file => {
fs.readdirSync(global_s3_assets).forEach((file) => {
// Import and parse template file
const raw_template = fs.readFileSync(`${global_s3_assets}/${file}`);
let template = JSON.parse(raw_template);

// Clean-up Lambda function code dependencies
const resources = (template.Resources) ? template.Resources : {};
const resources = template.Resources ? template.Resources : {};
const lambdaFunctions = Object.keys(resources).filter(function (key) {
return resources[key].Type === 'AWS::Lambda::Function';
});

// Rename lambda Assets to resource name and set the S3 key reference

lambdaFunctions.forEach(function (f) {
const fn = template.Resources[f];
const fn = resources[f];
if (fn.Properties.Code.hasOwnProperty('S3Bucket')) {
// Set the S3 key reference
let artifactHash = Object.assign(fn.Properties.Code.S3Bucket.Ref);
artifactHash = artifactHash.replace('AssetParameters', '');
artifactHash = artifactHash.substring(0, artifactHash.indexOf('S3Bucket'));
let artifactHash = Object.assign(fn.Properties.Code.S3Key);
artifactHash = artifactHash.replace(_regex, '');
artifactHash = artifactHash.substring(
0,
artifactHash.indexOf('.zip')
);
const assetPath = `asset${artifactHash}`;
fn.Properties.Code.S3Key = `%%SOLUTION_NAME%%/%%VERSION%%/${assetPath}.zip`;

// Set the S3 bucket reference
fn.Properties.Code.S3Bucket = {
'Fn::Sub': '%%BUCKET_NAME%%-${AWS::Region}'
'Fn::Sub': '%%BUCKET_NAME%%-${AWS::Region}',
};
// Set the handler
const handler = fn.Properties.Handler;
fn.Properties.Handler = `${assetPath}/${handler}`;
}
});

// Clean-up parameters section
const parameters = (template.Parameters) ? template.Parameters : {};
const assetParameters = Object.keys(parameters).filter(function (key) {
return key.includes('AssetParameters');
});
const parameters = template.Parameters ? template.Parameters : {};
const assetParameters = getAllAssetParameterKeys(parameters);
assetParameters.forEach(function (a) {
template.Parameters[a] = undefined;
});

// Convert modified template to YAML and output to file
const output_template = YAML.stringify(template);
// Output modified template file
const output_template = JSON.stringify(template, null, 2);
fs.writeFileSync(`${global_s3_assets}/${file}`, output_template);
});
});
Loading

0 comments on commit 269dfbf

Please sign in to comment.