Skip to content

Commit

Permalink
Merge pull request #497 from simonkrol/release/v6.2.0
Browse files Browse the repository at this point in the history
update to v6.2.0 open-source release
  • Loading branch information
simonkrol authored Aug 1, 2023
2 parents a3892ca + fd203f7 commit 3ca58b4
Show file tree
Hide file tree
Showing 49 changed files with 17,423 additions and 6,732 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
**/dist
**/global-s3-assets
**/regional-s3-assets
**/staging
**/open-source
**/.zip
**/tmp
Expand All @@ -14,6 +15,7 @@
**/coverage
**/coverage-reports
**/.nyc_output
**/mock-*

# misc
**/npm-debug.log
Expand Down
1 change: 1 addition & 0 deletions .viperlightignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ CONTRIBUTING.md:46
CODE_OF_CONDUCT.md:4
coverage/*
.zip
Config
4 changes: 0 additions & 4 deletions .viperlightrc

This file was deleted.

13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,23 @@ 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).

## [6.2.0] - 2023-04-24

### Added

+ Add `cdk-helper` module to help with packaging cdk generated assets in solutions internal pipelines
+ Use [DefaultStackSynthesizer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.DefaultStackSynthesizer.html) with different configurations to generate template for `cdk deploy` and on internal solutions pipeline
+ Add esbuild bundler for lambda functions using `NodejsFunction`, reference [aws_lambda_nodejs](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda_nodejs-readme.html)
+ Refactor pipeline scripts
+ Changes semver dependency version to 7.5.2 for github reported vulnerability CVE-2022-25883
+ Changes word-wrap dependency version to aashutoshrathi/word-wrap for github reported vulnerability CVE-2023-26115

## [6.1.2] - 2023-04-14

### Changed

- added s3 bucket ownership control permission and ownership parameter to S3 logging bucket to account for [changes in S3 default behavior](https://docs.aws.amazon.com/AmazonS3/latest/userguide/create-bucket-faq.html)
- changed xml2js version to 0.5.0
- changed xml2js version to 0.5.0 for github dependabot reported vulnerability CVE-2023-0842

## [6.1.1] - 2023-02-09

Expand Down
5 changes: 1 addition & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ When filing an issue, please check [existing open](https://github.com/aws-soluti

Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the _develop_ branch.
1. You are working against the latest source on the _main_ branch.
1. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
1. You open an issue to discuss any significant work - we would hate for your time to be wasted.
1. Note that the head of the develop branch contains latest features being developed for the solution.
1. Changes in this branch will be unstable and are not recommended for production deployments.

To send us a pull request, please:

Expand All @@ -36,7 +34,6 @@ To send us a pull request, please:
1. Run _npx npm run prettier-format_ in _source_ to ensure that code format standards are maintained.
1. If your changes include new capabilities, include in the PR description text that can be folded into the solution documentation.
1. Commit to your fork using clear commit messages.
1. Ensure that github Actions pass for all Required tasks.
1. In your repository _Security_ section, ensure that security advisories are enabled and address any Dependabot issues that appear.
1. Send us a pull request, answering any default questions in the pull request interface.
1. If the changes are complex or may involve additional communication, we may create a feature branch specific to your PR and ask you to rebase using that branch.
Expand Down
1 change: 1 addition & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This software includes third party software subject to the following copyrights:
@types/uuid under the Massachusetts Institute of Technology (MIT) license
@typescript-eslint/eslint-plugin under the Massachusetts Institute of Technology (MIT) license
@typescript-eslint/parser under the BSD 2-Clause license
adm-zip under the Massachusetts Institute of Technology (MIT) license
aws-cdk under the Apache License 2.0
aws-sdk under the Apache License 2.0
axios under the Massachusetts Institute of Technology (MIT) license
Expand Down
48 changes: 18 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
- [Customizing the Solution](#customizing-the-solution)
- [Prerequisites for Customization](#prerequisites-for-customization)
- [1. Clone the repository](#1-clone-the-repository)
- [2. Declare environment variables](#2-declare-environment-variables)
- [Unit Test](#unit-test)
- [Build](#build)
- [Deploy](#deploy)
- [2. Unit Test](#2-unit-test)
- [3. Build & Deploy](#3-build-and-deploy)
- [Collection of operational metrics](#collection-of-operational-metrics)
- [External Contributors](#external-contributors)
- [License](#license)
Expand Down Expand Up @@ -46,7 +44,7 @@ In addition to the AWS Solutions Constructs, the solution uses AWS CDK directly
## Prerequisites for Customization

- [AWS Command Line Interface](https://aws.amazon.com/cli/)
- Node.js 16.x or later
- Node.js 14.x

### 1. Clone the repository

Expand All @@ -56,39 +54,30 @@ cd serverless-image-handler
export MAIN_DIRECTORY=$PWD
```

### 2. Declare environment variables

```bash
export REGION=aws-region-code # the AWS region to launch the solution (e.g. us-east-1)
export BUCKET_PREFIX=my-bucket-name # the bucket prefix, randomized name recommended
export BUCKET_NAME=$BUCKET_PREFIX-$REGION # the bucket name where customized code will reside
export SOLUTION_NAME=my-solution-name # the solution name
export VERSION=my-version # version number for the customized code
```

## Unit Test
### 2. Unit Test

After making changes, run unit tests to make sure added customization passes the tests:

```bash
cd $MAIN_DIRECTORY/deployment
chmod +x run-unit-tests.sh
./run-unit-tests.sh
chmod +x run-unit-tests.sh && ./run-unit-tests.sh
```

## Build

### 3. Build and Deploy
```bash
cd $MAIN_DIRECTORY/deployment
chmod +x build-s3-dist.sh
./build-s3-dist.sh $BUCKET_PREFIX $SOLUTION_NAME $VERSION
cd $MAIN_DIRECTORY/source/constructs
npm run clean:install
overrideWarningsEnabled=false npx cdk bootstrap --profile <PROFILE_NAME>
overrideWarningsEnabled=false npx cdk deploy\
--parameters DeployDemoUIParameter=Yes\
--parameters SourceBucketsParameter=<MY_BUCKET>\
--profile <PROFILE_NAME>
```

## Deploy

- Deploy the distributable to the Amazon S3 bucket in your account. Make sure you are uploading the files in `deployment/global-s3-assets` and `deployment/regional-s3-assets` to `$BUCKET_NAME/$SOLUTION_NAME/$VERSION`.
- Get the link of the solution template uploaded to your Amazon S3 bucket.
- Deploy the solution to your account by launching a new AWS CloudFormation stack using the link of the solution template in Amazon S3.
_Note:_
- **MY_BUCKET**: name of an existing bucket in your account
- **PROFILE_NAME**: name of an AWS CLI profile that has appropriate credentials for deploying in your preferred region

# Collection of operational metrics

Expand Down Expand Up @@ -116,6 +105,5 @@ This solution collects anonymous operational metrics to help AWS improve the qua

# License

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

SPDX-License-Identifier: Apache-2.0
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
35 changes: 0 additions & 35 deletions buildspec.yml

This file was deleted.

78 changes: 0 additions & 78 deletions deployment/build-open-source-dist.sh

This file was deleted.

Loading

0 comments on commit 3ca58b4

Please sign in to comment.