Skip to content

Commit 0c95f89

Browse files
authored
Merge pull request aws-solutions#350 from aws-solutions/hotfix/1.4.2
Merge Hotfix/1.4.2 to main
2 parents b8c5ed8 + cb78eca commit 0c95f89

19 files changed

+9472
-992
lines changed

.viperlightignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Ignore Config used with code.amazon.com
2+
Config
3+
4+
^docs/
5+
^viperlight/
6+
source/lambda/schedulers/instance_scheduler.py:133
7+
source/lambda/schedulers/instance_scheduler.py:134
8+
source/lambda/requesthandlers/setup_demo_data.py:64
9+
deployment/buildspecs/mainline-s3-spec.yml:20
10+
source/lambda/models/rds/2014-10-31/service-2.json:152
11+
source/lambda/models/ssm/2014-11-06/service-2.json:3240
12+
source/lambda/tests/cloudformation_util.py:26
13+
source/lambda/tests/cloudformation_util.py:27
14+
source/lambda/tests/rds_util.py:27
15+
source/lambda/tests/rds_util.py:28
16+
source/lambda/tests/ec2_util.py:27
17+
source/lambda/tests/ec2_util.py:28
18+
CODE_OF_CONDUCT.md:4
19+
CONTRIBUTING.md:51
20+
source/package-lock.json:6526
21+
source/package-lock.json:3672
22+
source/package-lock.json:3510
23+
source/package-lock.json:3667
24+
source/test/aws-instance-scheduler-stack.test.ts:25
25+
source/test/aws-instance-scheduler-remote-stack.test.ts:24
26+
source/lambda/models/rds/2014-10-31/service-2.json:4873

.viperlightrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"all": true,
3+
"failOn": "medium"
4+
}

CHANGELOG.md

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

7+
## [1.4.2] - 2023-01-11
8+
### Fixed
9+
- Upgrade certifi to mitigate [CVE-2022-23491](https://nvd.nist.gov/vuln/detail/CVE-2022-23491).
10+
- Updated issues in bandit scan.
11+
- Updated the CDK version 2.x
12+
713
## [1.4.1] - 2022-05-12
814
### Fixed
915
- Replaced the DescribeLogStreams API call used for getting the next sequence token with PutLogEvents API call to reduce the lambda execution time [#307](https://github.com/awslabs/aws-instance-scheduler/issues/307)

buildspec.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
version: 0.2
2+
3+
phases:
4+
install:
5+
runtime-versions:
6+
python: 3.10
7+
commands:
8+
- pip install --upgrade pip
9+
pre_build:
10+
commands:
11+
- echo "Installing dependencies and executing unit tests - `pwd`"
12+
- cd source
13+
- chmod +x ./run-all-tests.sh && ./run-all-tests.sh
14+
- echo "Installing dependencies and executing unit tests completed `date`"
15+
build:
16+
commands:
17+
- echo "`pwd`"
18+
- echo "cd ../deployment"
19+
- cd ../deployment
20+
- echo "Starting build `date` in `pwd`"
21+
- chmod +x ./build-s3-dist.sh && ./build-s3-dist.sh $DIST_OUTPUT_BUCKET $SOLUTION_NAME $VERSION
22+
- echo "Build completed `date`"
23+
- echo "Starting open-source-dist `date` in `pwd`"
24+
- chmod +x ./build-open-source-dist.sh && ./build-open-source-dist.sh $SOLUTION_NAME
25+
- echo "Open Source Dist completed `date`"
26+
27+
post_build:
28+
commands:
29+
- echo "Retrieving next stage buildspec `date` in `pwd`"
30+
- aws s3 cp s3://solutions-build-assets/changelog-spec.yml ../buildspec.yml
31+
- echo "Retrieving next stage buildspec complete"
32+
- echo "Post build completed on `date`"
33+
34+
artifacts:
35+
files:
36+
- deployment/**/*
37+
- buildspec.yml
38+
- CHANGELOG.md

deployment/build-s3-dist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#
1414

1515
# Important: CDK global version number
16-
cdk_version=1.96.0
16+
cdk_version=2.59.0
1717

1818
# Check to see if the required parameters have been provided:
1919
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then

source/bin/aws-instance-scheduler.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* permissions and limitations under the License. *
1515
*****************************************************************************/
1616

17-
import * as cdk from '@aws-cdk/core';
17+
import * as cdk from 'aws-cdk-lib';
1818
import { AwsInstanceSchedulerStack } from '../lib/aws-instance-scheduler-stack';
1919
import { AwsInstanceSchedulerRemoteStack } from '../lib/aws-instance-scheduler-remote-stack';
2020

@@ -28,6 +28,9 @@ const SOLUTION_PROVIDER = 'AWS Solution Development';
2828
const app = new cdk.App();
2929

3030
new AwsInstanceSchedulerStack(app, 'aws-instance-scheduler', {
31+
synthesizer: new cdk.DefaultStackSynthesizer({
32+
generateBootstrapVersionRule: false
33+
}),
3134
description: `(${SOLUTION_ID}) - The AWS CloudFormation template for deployment of the ${SOLUTION_NAME}, version: ${SOLUTION_VERSION}`,
3235
solutionId: SOLUTION_ID,
3336
solutionTradeMarkName: SOLUTION_TMN,
@@ -37,6 +40,9 @@ new AwsInstanceSchedulerStack(app, 'aws-instance-scheduler', {
3740
solutionVersion: SOLUTION_VERSION
3841
});
3942
new AwsInstanceSchedulerRemoteStack(app, 'aws-instance-scheduler-remote', {
43+
synthesizer: new cdk.DefaultStackSynthesizer({
44+
generateBootstrapVersionRule: false
45+
}),
4046
description: `(${SOLUTION_ID}S) - The AWS CloudFormation template for ${SOLUTION_NAME} cross account role, version: ${SOLUTION_VERSION}`,
4147
solutionId: SOLUTION_ID,
4248
solutionTradeMarkName: SOLUTION_TMN,

source/cli/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
description="AWS Instance Scheduler CLI",
2424
install_requires=[
2525
"argparse",
26-
"requests>=2.18.4",
27-
"jmespath>=0.9.3",
28-
"boto3>=1.4.7"]
26+
"requests>=2.28.1",
27+
"jmespath>=1.0.1",
28+
"boto3>=1.26.48"]
2929
)
3030

source/jest.config.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module.exports = {
2-
"roots": [
3-
"<rootDir>/test"
4-
],
5-
testMatch: [ '**/*.test.ts'],
6-
"transform": {
7-
"^.+\\.tsx?$": "ts-jest"
8-
},
2+
"roots": [
3+
"<rootDir>/test"
4+
],
5+
testMatch: [ '**/*.test.ts'],
6+
transform: {
7+
'^.+\\.tsx?$': 'ts-jest'
98
}
9+
}

source/lambda/bin/chardetect

Lines changed: 0 additions & 8 deletions
This file was deleted.

source/lambda/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
pytz
2-
requests
2+
requests
3+
chardet

0 commit comments

Comments
 (0)