From b34da87bd13422ca07676552de83b09969b08c1d Mon Sep 17 00:00:00 2001 From: Alireza Assadzadeh Date: Wed, 1 Sep 2021 13:33:17 -0400 Subject: [PATCH] Update to version v1.0.1 --- CHANGELOG.md | 7 +- LICENSE.MIT-0 | 14 --- NOTICE.txt | 14 +-- README.md | 10 +- deployment/build-s3-dist.sh | 4 +- deployment/operations-conductor.template | 100 ++++++++++++++---- source/console/package.json | 17 +-- source/console/src/App.tsx | 11 +- source/console/src/AppWithAuth.tsx | 11 +- .../src/components/CustomForgotPassword.tsx | 11 +- .../components/CustomRequireNewPassword.tsx | 11 +- .../console/src/components/CustomSignIn.tsx | 11 +- source/console/src/components/CustomUtil.tsx | 11 +- .../src/components/CustomVerifyContact.tsx | 11 +- source/console/src/components/Footer.tsx | 11 +- source/console/src/index.tsx | 11 +- source/console/src/views/Actions.tsx | 11 +- .../src/views/AutomationExecutions.tsx | 11 +- source/console/src/views/TaskCreate.tsx | 11 +- source/console/src/views/TaskDetail.tsx | 11 +- source/console/src/views/Tasks.tsx | 11 +- source/console/src/views/Users.tsx | 11 +- source/console/tsconfig.json | 6 +- source/services/actions/actions.ts | 31 +++--- source/services/actions/app.ts | 31 +++--- source/services/actions/index.ts | 31 +++--- source/services/common/interfaces.ts | 31 +++--- source/services/common/util.ts | 31 +++--- source/services/custom-resource/index.ts | 83 +++++++++++---- .../custom-resource/lambda-edge/index.js | 19 +--- .../cloudformation.template | 13 +-- .../cloudformation.template | 13 +-- .../cloudformation.template | 13 +-- .../cloudformation.template | 13 +-- .../cloudformation.template | 13 +-- source/services/custom-resource/ssm/index.ts | 31 +++--- source/services/metrics/index.ts | 31 +++--- source/services/package.json | 28 ++--- source/services/queue-consumer/index.ts | 31 +++--- source/services/resource-selector/index.ts | 31 +++--- source/services/tasks/app.ts | 31 +++--- source/services/tasks/event-handler.template | 4 +- source/services/tasks/index.ts | 31 +++--- source/services/tasks/tasks.ts | 31 +++--- source/services/users/app.ts | 31 +++--- source/services/users/index.ts | 31 +++--- source/services/users/users.ts | 31 +++--- 47 files changed, 550 insertions(+), 451 deletions(-) delete mode 100644 LICENSE.MIT-0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cf7638..ab5b11b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ 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). +## [1.0.1] - 2021-09-01 +### Changed +- Update Lambda versions to Node.js 14. +- Update to the node depdendencies. + ## [1.0.0] - 2019-11-13 ### Added -- Operations Conductor release \ No newline at end of file +- Operations Conductor release diff --git a/LICENSE.MIT-0 b/LICENSE.MIT-0 deleted file mode 100644 index 9e30e05..0000000 --- a/LICENSE.MIT-0 +++ /dev/null @@ -1,14 +0,0 @@ -Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/NOTICE.txt b/NOTICE.txt index 19b80d1..dc4840d 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1,16 +1,18 @@ Operations Conductor Reference Architecture -Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +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. -A copy of the License is located at +You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -or in the "license" file accompanying this file. This file 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 lithe Massachusetts Institute of Technology (MIT) licenseations under the License. +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. ********************** THIRD PARTY COMPONENTS diff --git a/README.md b/README.md index 367ca2c..318e83d 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,16 @@ aws s3 cp $OPS_CO_PATH/deployment/regional-s3-assets/ s3://$DIST_OUTPUT_BUCKET-$ * Get the link of the operations-conductor.template uploaded to your Amazon S3 bucket. * Deploy the Operations Conductor solution to your account by launching a new AWS CloudFormation stack using the link of the operations-conductor.template. +## Collection of operational metrics +This solution collects anonymous operational metrics to help AWS improve the quality and 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/operations-conductor/appendix-f.html). + + *** Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -This project is licensed under the terms of the Apache 2.0 license. See LICENSE. Included AWS Lambda functions are licensed under the MIT-0 license. See LICENSE.MIT-0. \ No newline at end of file +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/LICENSE-2.0 + +or in the "license" file accompanying this file. This file 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. diff --git a/deployment/build-s3-dist.sh b/deployment/build-s3-dist.sh index c9082ca..382059e 100755 --- a/deployment/build-s3-dist.sh +++ b/deployment/build-s3-dist.sh @@ -9,7 +9,7 @@ # Parameters: # - source-bucket-base-name: Name for the S3 bucket location where the template will source the Lambda # code from. The template will append '-[region_name]' to this bucket name. -# For example: ./build-s3-dist.sh solutions my-solution v1.0.0 +# For example: ./build-s3-dist.sh solutions my-solution v1.0.1 # The template will then expect the source code to be located in the solutions-[region_name] bucket # # - trademarked-solution-name: name of the solution for consistency @@ -19,7 +19,7 @@ # Check to see if input has been provided: if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then echo "Please provide the base source bucket name, trademark approved solution name and version where the lambda code will eventually reside." - echo "For example: ./build-s3-dist.sh solutions trademarked-solution-name v1.0.0" + echo "For example: ./build-s3-dist.sh solutions trademarked-solution-name v1.0.1" exit 1 fi diff --git a/deployment/operations-conductor.template b/deployment/operations-conductor.template index b6e4206..451b772 100644 --- a/deployment/operations-conductor.template +++ b/deployment/operations-conductor.template @@ -1,15 +1,16 @@ -# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# 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. -# A copy of the License is located at +# You may obtain a copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # -# or in the "license" file accompanying this file. This file 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. +# 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. AWSTemplateFormatVersion: "2010-09-09" Description: "(SO0065) - The AWS CloudFormation template for deployment of the %%SOLUTION_NAME%% Solution. Version %%VERSION%%" @@ -250,6 +251,7 @@ Resources: Action: - "lambda:CreateFunction" - "lambda:PublishVersion" + - "lambda:UpdateFunctionConfiguration" Resource: - !Sub "arn:aws:lambda:us-east-1:${AWS::AccountId}:function:${AWS::StackName}-Lambda-Edge" # To create/delete UserPoolClient by custom resource @@ -1338,9 +1340,10 @@ Resources: Metadata: cfn_nag: rules_to_suppress: - - - id: W45 - reason: "This solution does not require API Gateway access logging." + - id: W45 + reason: "This solution does not require API Gateway access logging." + - id: W68 + reason: "The solution has a very small footprint in the API gateway, only the solution's UI uses the end points which have limited usage scenarios." # Lambda Functions CustomResourceLambda: @@ -1352,12 +1355,21 @@ Resources: S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"], "operations-conductor-services.zip"]] Handler: custom-resource/index.handler Role: !GetAtt CustomResourceRole.Arn - Runtime: nodejs10.x + Runtime: nodejs14.x MemorySize: 256 Timeout: 300 Environment: Variables: LogLevel: !Ref LogLevel + Metadata: + cfn_nag: + rules_to_suppress: + - id: W58 + reason: "Lambda functions have permission to write to logs in CustomResourcePolicy." + - id: W89 + reason: "This Lambda function does not need to access any resource provisioned within a VPC." + - id: W92 + reason: "This Lambda function does not need to reserved concurrency." UserServiceLambda: Type: AWS::Lambda::Function @@ -1368,7 +1380,7 @@ Resources: S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"], "operations-conductor-services.zip"]] Handler: users/index.handler Role: !GetAtt UserServiceRole.Arn - Runtime: nodejs10.x + Runtime: nodejs14.x MemorySize: 256 Timeout: 60 Environment: @@ -1379,6 +1391,15 @@ Resources: SolutionVersion: !FindInMap ["Solution", "Data", "Version"] SolutionUuid: !GetAtt CustomResourceAppUuid.UUID LogLevel: !Ref LogLevel + Metadata: + cfn_nag: + rules_to_suppress: + - id: W58 + reason: "Lambda functions have permission to write to logs in UserServicePolicy." + - id: W89 + reason: "This Lambda function does not need to access any resource provisioned within a VPC." + - id: W92 + reason: "This Lambda function does not need to reserved concurrency." TaskServiceLambda: Type: AWS::Lambda::Function @@ -1389,7 +1410,7 @@ Resources: S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"], "operations-conductor-services.zip"]] Handler: tasks/index.handler Role: !GetAtt TaskServiceRole.Arn - Runtime: nodejs10.x + Runtime: nodejs14.x MemorySize: 256 Timeout: 60 Environment: @@ -1408,6 +1429,15 @@ Resources: MasterKmsArn: !GetAtt SnsEncryptionKey.Arn Region: !Ref "AWS::Region" LogLevel: !Ref LogLevel + Metadata: + cfn_nag: + rules_to_suppress: + - id: W58 + reason: "Lambda functions have permission to write to logs in TaskServicePolicy." + - id: W89 + reason: "This Lambda function does not need to access any resource provisioned within a VPC." + - id: W92 + reason: "This Lambda function does not need to reserved concurrency." ActionServiceLambda: Type: AWS::Lambda::Function @@ -1418,7 +1448,7 @@ Resources: S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"], "operations-conductor-services.zip"]] Handler: actions/index.handler Role: !GetAtt ActionServiceRole.Arn - Runtime: nodejs10.x + Runtime: nodejs14.x MemorySize: 128 Timeout: 15 Environment: @@ -1426,6 +1456,15 @@ Resources: FilterTagKey: !Ref DocumentTagKey FilterTagValue: !Ref DocumentTagValue LogLevel: !Ref LogLevel + Metadata: + cfn_nag: + rules_to_suppress: + - id: W58 + reason: "Lambda functions have permission to write to logs in ActionServicePolicy." + - id: W89 + reason: "This Lambda function does not need to access any resource provisioned within a VPC." + - id: W92 + reason: "This Lambda function does not need to reserved concurrency." ConsumerLambda: Type: AWS::Lambda::Function @@ -1436,12 +1475,21 @@ Resources: S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"], "operations-conductor-services.zip"]] Handler: queue-consumer/index.handler Role: !GetAtt ConsumerLambdaExecutionRole.Arn - Runtime: nodejs10.x + Runtime: nodejs14.x Timeout: 15 MemorySize: 128 Environment: Variables: LogLevel: !Ref LogLevel + Metadata: + cfn_nag: + rules_to_suppress: + - id: W58 + reason: "Lambda functions have permission to write to logs in ConsumerLambdaExecutionPolicy." + - id: W89 + reason: "This Lambda function does not need to access any resource provisioned within a VPC." + - id: W92 + reason: "This Lambda function does not need to reserved concurrency." ResourceSelectorLambda: Type: AWS::Lambda::Function @@ -1452,7 +1500,7 @@ Resources: S3Key: !Join ["/", [!FindInMap ["SourceCode", "General", "KeyPrefix"], "operations-conductor-services.zip"]] Handler: resource-selector/index.handler Role: !GetAtt ResourceSelectorExecutionRole.Arn - Runtime: nodejs10.x + Runtime: nodejs14.x Timeout: 15 MemorySize: 128 Environment: @@ -1464,6 +1512,15 @@ Resources: SolutionVersion: !FindInMap ["Solution", "Data", "Version"] SolutionUuid: !GetAtt CustomResourceAppUuid.UUID LogLevel: !Ref LogLevel + Metadata: + cfn_nag: + rules_to_suppress: + - id: W58 + reason: "Lambda functions have permission to write to logs in ResourceSelectorExecutionPolicy." + - id: W89 + reason: "This Lambda function does not need to access any resource provisioned within a VPC." + - id: W92 + reason: "This Lambda function does not need to reserved concurrency." # Cognito UserPool UserPool: @@ -1680,9 +1737,10 @@ Resources: Metadata: cfn_nag: rules_to_suppress: - - - id: W10 - reason: "This solution does not require CloudFront distribution access logging." + - id: W10 + reason: "This solution does not require CloudFront distribution access logging." + - id: W70 + reason: "If the distribution uses the CloudFront domain name such as d111111abcdef8.cloudfront.net (you set CloudFrontDefaultCertificate to true), CloudFront automatically sets the security policy to TLSv1 regardless of the value that you set here. refer https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html" WebsiteOriginAccessIdentity: Type: AWS::CloudFront::CloudFrontOriginAccessIdentity @@ -1706,6 +1764,8 @@ Resources: KeyType: "HASH" SSESpecification: SSEEnabled: true + PointInTimeRecoverySpecification: + PointInTimeRecoveryEnabled: true TaskExecutionsTable: Type: AWS::DynamoDB::Table @@ -1743,6 +1803,8 @@ Resources: ProjectionType: "ALL" SSESpecification: SSEEnabled: true + PointInTimeRecoverySpecification: + PointInTimeRecoveryEnabled: true AutomationExecutionsTable: Type: AWS::DynamoDB::Table @@ -1765,6 +1827,8 @@ Resources: KeyType: "RANGE" SSESpecification: SSEEnabled: true + PointInTimeRecoverySpecification: + PointInTimeRecoveryEnabled: true # SQS DeadLetterQueue: diff --git a/source/console/package.json b/source/console/package.json index 43f136f..ff7036f 100644 --- a/source/console/package.json +++ b/source/console/package.json @@ -1,26 +1,27 @@ { "name": "operations-conductor-console", "description": "The Operations Conductor Web console", - "version": "1.0.0", + "version": "1.0.1", "private": true, "dependencies": { "aws-amplify": "^1.2.3", "aws-amplify-react": "^2.5.3", + "bootstrap": "^3.3.7", + "node-sass": "^6.0.1", "react": "^16.11.0", - "react-dom": "^16.11.0", - "react-router-dom": "^5.1.2", - "react-scripts": "^3.2.0", "react-bootstrap": "^0.32.4", + "react-dom": "^16.11.0", "react-router-bootstrap": "^0.25.0", - "bootstrap": "^3.3.7", - "node-sass": "^4.12.0" + "react-router-dom": "^5.1.2", + "react-scripts": "4.0.3", + "uuid": "8.3.2" }, "devDependencies": { "@types/react": "^16.9.9", - "@types/react-dom": "^16.9.2", - "@types/react-router-dom": "^5.1.0", "@types/react-bootstrap": "^0.32.20", + "@types/react-dom": "^16.9.2", "@types/react-router-bootstrap": "^0.24.5", + "@types/react-router-dom": "^5.1.0", "typescript": "3.2.1" }, "scripts": { diff --git a/source/console/src/App.tsx b/source/console/src/App.tsx index 6cce050..8b32801 100644 --- a/source/console/src/App.tsx +++ b/source/console/src/App.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/AppWithAuth.tsx b/source/console/src/AppWithAuth.tsx index 59f25e6..7671f06 100644 --- a/source/console/src/AppWithAuth.tsx +++ b/source/console/src/AppWithAuth.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/components/CustomForgotPassword.tsx b/source/console/src/components/CustomForgotPassword.tsx index 49abd70..93aff69 100644 --- a/source/console/src/components/CustomForgotPassword.tsx +++ b/source/console/src/components/CustomForgotPassword.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/components/CustomRequireNewPassword.tsx b/source/console/src/components/CustomRequireNewPassword.tsx index 44dbf9b..3665c43 100644 --- a/source/console/src/components/CustomRequireNewPassword.tsx +++ b/source/console/src/components/CustomRequireNewPassword.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/components/CustomSignIn.tsx b/source/console/src/components/CustomSignIn.tsx index abf4968..2012f73 100644 --- a/source/console/src/components/CustomSignIn.tsx +++ b/source/console/src/components/CustomSignIn.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/components/CustomUtil.tsx b/source/console/src/components/CustomUtil.tsx index 52027cb..36eae84 100644 --- a/source/console/src/components/CustomUtil.tsx +++ b/source/console/src/components/CustomUtil.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ export const LOGGING_LEVEL = 'INFO'; diff --git a/source/console/src/components/CustomVerifyContact.tsx b/source/console/src/components/CustomVerifyContact.tsx index b1cafa3..a33d6ad 100644 --- a/source/console/src/components/CustomVerifyContact.tsx +++ b/source/console/src/components/CustomVerifyContact.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/components/Footer.tsx b/source/console/src/components/Footer.tsx index b1ef088..af88057 100644 --- a/source/console/src/components/Footer.tsx +++ b/source/console/src/components/Footer.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/index.tsx b/source/console/src/index.tsx index 56fbc01..ddf3a20 100644 --- a/source/console/src/index.tsx +++ b/source/console/src/index.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import React from 'react'; diff --git a/source/console/src/views/Actions.tsx b/source/console/src/views/Actions.tsx index 3c8b77f..9b609ce 100644 --- a/source/console/src/views/Actions.tsx +++ b/source/console/src/views/Actions.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/views/AutomationExecutions.tsx b/source/console/src/views/AutomationExecutions.tsx index 2f0bc44..d38a6d3 100644 --- a/source/console/src/views/AutomationExecutions.tsx +++ b/source/console/src/views/AutomationExecutions.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/views/TaskCreate.tsx b/source/console/src/views/TaskCreate.tsx index 3debbd1..80c9357 100644 --- a/source/console/src/views/TaskCreate.tsx +++ b/source/console/src/views/TaskCreate.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/views/TaskDetail.tsx b/source/console/src/views/TaskDetail.tsx index 64daba5..4bf9e97 100644 --- a/source/console/src/views/TaskDetail.tsx +++ b/source/console/src/views/TaskDetail.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/views/Tasks.tsx b/source/console/src/views/Tasks.tsx index 0b37363..8e2fbd8 100644 --- a/source/console/src/views/Tasks.tsx +++ b/source/console/src/views/Tasks.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/src/views/Users.tsx b/source/console/src/views/Users.tsx index 41672f4..d378d5f 100644 --- a/source/console/src/views/Users.tsx +++ b/source/console/src/views/Users.tsx @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * 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. * @@ -7,10 +7,11 @@ * * * http://www.apache.org/licenses/LICENSE-2.0 * * * - * or in the "license" file accompanying this file. This file 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. * + * 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. * ****************************************************************************/ import * as React from 'react'; diff --git a/source/console/tsconfig.json b/source/console/tsconfig.json index 6ce58b8..233aa60 100644 --- a/source/console/tsconfig.json +++ b/source/console/tsconfig.json @@ -17,9 +17,11 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "preserve" + "jsx": "react", + "noFallthroughCasesInSwitch": true }, "include": [ - "src", "__tests__" + "src", + "__tests__" ] } diff --git a/source/services/actions/actions.ts b/source/services/actions/actions.ts index f831394..3a5577a 100644 --- a/source/services/actions/actions.ts +++ b/source/services/actions/actions.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import * as AWS from 'aws-sdk'; import { factory } from '../logger'; diff --git a/source/services/actions/app.ts b/source/services/actions/app.ts index 7f8d7fb..5d48ffa 100644 --- a/source/services/actions/app.ts +++ b/source/services/actions/app.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import * as express from 'express'; import * as bodyParser from 'body-parser'; diff --git a/source/services/actions/index.ts b/source/services/actions/index.ts index 3cdfaf3..6ef888b 100644 --- a/source/services/actions/index.ts +++ b/source/services/actions/index.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import { Context } from 'aws-lambda'; import { createServer, proxy } from 'aws-serverless-express'; diff --git a/source/services/common/interfaces.ts b/source/services/common/interfaces.ts index 9169cd2..c3b2936 100644 --- a/source/services/common/interfaces.ts +++ b/source/services/common/interfaces.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ /** * The interface of error return diff --git a/source/services/common/util.ts b/source/services/common/util.ts index 984e452..efa3670 100644 --- a/source/services/common/util.ts +++ b/source/services/common/util.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import * as moment from 'moment'; import { ErrorReturn, MetricInfo } from './interfaces'; diff --git a/source/services/custom-resource/index.ts b/source/services/custom-resource/index.ts index dbf319f..8087118 100644 --- a/source/services/custom-resource/index.ts +++ b/source/services/custom-resource/index.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import { Context, Callback } from 'aws-lambda'; import * as url from 'url'; @@ -59,7 +58,7 @@ export const handler = async (event: any, context: Context, callback: Callback) try { if (event.ResourceType === 'Custom::CopyWebsite') { - if (event.RequestType === 'Create') { + if (event.RequestType === 'Create' || event.RequestType === 'Update') { const { SourceS3Bucket, SourceS3Key, SourceManifest, DestinationS3Bucket } = properties; try { responseData = await copyWebsite(SourceS3Bucket, SourceS3Key, SourceManifest, DestinationS3Bucket); @@ -69,7 +68,7 @@ export const handler = async (event: any, context: Context, callback: Callback) } } } else if (event.ResourceType === 'Custom::PutWebsiteConfig') { - if (event.RequestType === 'Create') { + if (event.RequestType === 'Create' || event.RequestType === 'Update') { const { Region, S3Bucket, S3Key, ConfigItem } = properties; try { let configFile = webConfig.replace(/REGION/g, Region) @@ -100,9 +99,20 @@ export const handler = async (event: any, context: Context, callback: Callback) responseData = { Message: result }; + } else if (event.RequestType === 'Update') { + const { StackName } = properties; + const ssm = new SSM(StackName, SSM_SLEEP_SECOND); + await ssm.deleteDocuments('custom-resource/ssm/'); + const { StackNameNew, FilterTagKey, FilterTagValue } = properties; + const ssm_for_create = new SSM(StackNameNew, SSM_SLEEP_SECOND, FilterTagKey, FilterTagValue); + let createAgainResponse = await ssm_for_create.createDocuments('custom-resource/ssm/', properties); + + responseData = { + Message: createAgainResponse + }; } } else if (event.ResourceType === 'Custom::UploadCloudFormationTemplates') { - if (event.RequestType === 'Create') { + if (event.RequestType === 'Create' || event.RequestType === 'Update') { const { StackName, MasterAccount, CloudFormationBucket, ResourceSelectorExecutionRoleArn, DocumentRoleArns, SolutionVersion } = properties; try { @@ -165,7 +175,7 @@ export const handler = async (event: any, context: Context, callback: Callback) FunctionName, Role, Handler: 'index.handler', - Runtime: 'nodejs10.x', + Runtime: 'nodejs14.x', Description: 'Operations Conductor Lambda Edge function', MemorySize: 128, Timeout: 15 @@ -177,6 +187,37 @@ export const handler = async (event: any, context: Context, callback: Callback) throw Error('Creating Edge Lambda failed.'); } + // Publishes Edge Lambda version + try { + let params: AWS.Lambda.PublishVersionRequest = { + FunctionName: functionArn + }; + let result = await lambda.publishVersion(params).promise(); + responseData = { + FunctionArn: `${functionArn}:${result.Version}` + }; + } catch (error) { + LOGGER.error('Publishing Edge Lambda version failed.', error); + throw Error('Publishing Edge Lambda version failed.'); + } + } else if (event.RequestType === 'Update') { + const lambda = new AWS.Lambda({ region: 'us-east-1' }) + const { FunctionName, Role, Code } = properties; + let functionArn = ''; + + try { + //update lambda function runtime from nodejs10 to nodejs14. + let updateResult = await lambda.updateFunctionConfiguration({ + FunctionName: FunctionName, + Runtime: 'nodejs14.x' + }).promise() + functionArn = updateResult.FunctionArn; + + LOGGER.info("Lambda function " + FunctionName + ", updated runtime successfully, response: "+ JSON.stringify(updateResult)) + } catch (error) { + LOGGER.error('Lambda Edge update failed.', error); + throw Error('Lambda Edge update failed.'); + } // Publishes Edge Lambda version try { let params: AWS.Lambda.PublishVersionRequest = { @@ -237,6 +278,8 @@ export const handler = async (event: any, context: Context, callback: Callback) eventType = 'SolutionLaunched'; } else if (event.RequestType === 'Delete') { eventType = 'SolutionDeleted'; + } else if (event.RequestType === 'Update') { + eventType = 'SolutionUpdated'; } let metric = { diff --git a/source/services/custom-resource/lambda-edge/index.js b/source/services/custom-resource/lambda-edge/index.js index 636eb61..c322d84 100644 --- a/source/services/custom-resource/lambda-edge/index.js +++ b/source/services/custom-resource/lambda-edge/index.js @@ -1,21 +1,4 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ - - exports.handler = async (event, context, callback) => { +exports.handler = async (event, context, callback) => { const response = event.Records[0].cf.response; const headers = response.headers; diff --git a/source/services/custom-resource/ssm/OperationsConductor-CopySnapshot/cloudformation.template b/source/services/custom-resource/ssm/OperationsConductor-CopySnapshot/cloudformation.template index 508e59e..2a1f7f6 100644 --- a/source/services/custom-resource/ssm/OperationsConductor-CopySnapshot/cloudformation.template +++ b/source/services/custom-resource/ssm/OperationsConductor-CopySnapshot/cloudformation.template @@ -1,15 +1,16 @@ -# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# 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. -# A copy of the License is located at +# You may obtain a copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # -# or in the "license" file accompanying this file. This file 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. +# 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. AWSTemplateFormatVersion: "2010-09-09" Description: "(SO0065) - Operations Conductor CopySnapshot for cross accounts/regions. Version %%VERSION%%" diff --git a/source/services/custom-resource/ssm/OperationsConductor-CreateSnapshot/cloudformation.template b/source/services/custom-resource/ssm/OperationsConductor-CreateSnapshot/cloudformation.template index 30ed0cf..8d97117 100644 --- a/source/services/custom-resource/ssm/OperationsConductor-CreateSnapshot/cloudformation.template +++ b/source/services/custom-resource/ssm/OperationsConductor-CreateSnapshot/cloudformation.template @@ -1,15 +1,16 @@ -# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# 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. -# A copy of the License is located at +# You may obtain a copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # -# or in the "license" file accompanying this file. This file 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. +# 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. AWSTemplateFormatVersion: "2010-09-09" Description: "(SO0065) - Operations Conductor CreateSnapshot for cross accounts/regions. Version %%VERSION%%" diff --git a/source/services/custom-resource/ssm/OperationsConductor-DeleteSnapshot/cloudformation.template b/source/services/custom-resource/ssm/OperationsConductor-DeleteSnapshot/cloudformation.template index a6ae71c..02d0218 100644 --- a/source/services/custom-resource/ssm/OperationsConductor-DeleteSnapshot/cloudformation.template +++ b/source/services/custom-resource/ssm/OperationsConductor-DeleteSnapshot/cloudformation.template @@ -1,15 +1,16 @@ -# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# 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. -# A copy of the License is located at +# You may obtain a copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # -# or in the "license" file accompanying this file. This file 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. +# 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. AWSTemplateFormatVersion: "2010-09-09" Description: "(SO0065) - Operations Conductor DeleteSnapshot for cross accounts/regions. Version %%VERSION%%" diff --git a/source/services/custom-resource/ssm/OperationsConductor-ResizeInstance/cloudformation.template b/source/services/custom-resource/ssm/OperationsConductor-ResizeInstance/cloudformation.template index 4dcf70c..2778808 100644 --- a/source/services/custom-resource/ssm/OperationsConductor-ResizeInstance/cloudformation.template +++ b/source/services/custom-resource/ssm/OperationsConductor-ResizeInstance/cloudformation.template @@ -1,15 +1,16 @@ -# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# 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. -# A copy of the License is located at +# You may obtain a copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # -# or in the "license" file accompanying this file. This file 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. +# 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. AWSTemplateFormatVersion: "2010-09-09" Description: "(SO0065) - Operations Conductor ResizeInstance for cross accounts/regions. Version %%VERSION%%" diff --git a/source/services/custom-resource/ssm/OperationsConductor-SetDynamoDBCapacity/cloudformation.template b/source/services/custom-resource/ssm/OperationsConductor-SetDynamoDBCapacity/cloudformation.template index b67415a..5821a2c 100644 --- a/source/services/custom-resource/ssm/OperationsConductor-SetDynamoDBCapacity/cloudformation.template +++ b/source/services/custom-resource/ssm/OperationsConductor-SetDynamoDBCapacity/cloudformation.template @@ -1,15 +1,16 @@ -# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +# 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. -# A copy of the License is located at +# You may obtain a copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # -# or in the "license" file accompanying this file. This file 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. +# 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. AWSTemplateFormatVersion: "2010-09-09" Description: "(SO0065) - Operations Conductor SetDynamoDBCapacity for cross accounts/regions. Version %%VERSION%%" diff --git a/source/services/custom-resource/ssm/index.ts b/source/services/custom-resource/ssm/index.ts index 200ed76..617230b 100644 --- a/source/services/custom-resource/ssm/index.ts +++ b/source/services/custom-resource/ssm/index.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import * as AWS from 'aws-sdk'; import * as fs from 'fs'; diff --git a/source/services/metrics/index.ts b/source/services/metrics/index.ts index 162315c..cfb83c1 100644 --- a/source/services/metrics/index.ts +++ b/source/services/metrics/index.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import * as requestPromise from 'request-promise'; import { factory } from '../logger'; diff --git a/source/services/package.json b/source/services/package.json index dcc22b2..b4e16a3 100644 --- a/source/services/package.json +++ b/source/services/package.json @@ -1,6 +1,6 @@ { "name": "operations-conductor-services", - "version": "1.0.0", + "version": "1.0.1", "description": "Operations Conductor solution services Lambda function package", "main": "index.js", "scripts": { @@ -17,28 +17,28 @@ "aws-lambda": "^1.0.6", "aws-serverless-express": "^3.0.1", "body-parser": "^1.19.0", - "express": "^4.17.1", "cors": "^2.8.5", - "request-promise": "^4.2.4", - "request": "^2.88.0", - "uuid": "^3.3.2", - "moment": "^2.24.0", + "express": "^4.17.1", "jwt-decode": "^2.2.0", - "typescript-logging": "^0.6.3" + "moment": "^2.24.0", + "request": "^2.88.0", + "request-promise": "^4.2.4", + "typescript-logging": "^0.6.3", + "uuid": "^8.3.2" }, "devDependencies": { "@types/aws-lambda": "^8.10.30", "@types/aws-serverless-express": "^3.0.1", "@types/cors": "^2.8.5", - "@types/jest": "24.0.15", + "@types/jest": "27.0.0", + "@types/jwt-decode": "^2.2.1", "@types/node": "^12.6.8", "@types/request-promise": "^4.1.44", - "@types/jwt-decode": "^2.2.1", - "@types/uuid": "^3.4.5", - "ts-jest": "^24.0.2", + "@types/uuid": "^8.3.1", + "aws-sdk": "^2.496.0", + "jest": "27.0.6", + "ts-jest": "^27.0.5", "ts-node": "^8.3.0", - "jest": "24.8.0", - "typescript": "^3.5.3", - "aws-sdk": "^2.496.0" + "typescript": "^3.5.3" } } diff --git a/source/services/queue-consumer/index.ts b/source/services/queue-consumer/index.ts index 7c8787a..aacb7c9 100644 --- a/source/services/queue-consumer/index.ts +++ b/source/services/queue-consumer/index.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import { factory } from '../logger'; import * as AWS from 'aws-sdk'; diff --git a/source/services/resource-selector/index.ts b/source/services/resource-selector/index.ts index 59bce79..279bf26 100644 --- a/source/services/resource-selector/index.ts +++ b/source/services/resource-selector/index.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import { factory } from '../logger'; import { CommonUtil } from '../common/util'; diff --git a/source/services/tasks/app.ts b/source/services/tasks/app.ts index a8840f5..9397d91 100644 --- a/source/services/tasks/app.ts +++ b/source/services/tasks/app.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import * as express from 'express'; import * as bodyParser from 'body-parser'; diff --git a/source/services/tasks/event-handler.template b/source/services/tasks/event-handler.template index 14337ce..b268b3f 100644 --- a/source/services/tasks/event-handler.template +++ b/source/services/tasks/event-handler.template @@ -79,7 +79,7 @@ Description: "The Operations Conductor event forwarder" Handler: index.handler Role: !GetAtt EventForwarderRole.Arn - Runtime: nodejs10.x + Runtime: nodejs14.x MemorySize: 128 Timeout: 15 Environment: @@ -91,7 +91,7 @@ Code: ZipFile: !Sub | /***************************************************************************** - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * + * Copyright 2021 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. * diff --git a/source/services/tasks/index.ts b/source/services/tasks/index.ts index 3cdfaf3..6ef888b 100644 --- a/source/services/tasks/index.ts +++ b/source/services/tasks/index.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import { Context } from 'aws-lambda'; import { createServer, proxy } from 'aws-serverless-express'; diff --git a/source/services/tasks/tasks.ts b/source/services/tasks/tasks.ts index a22f1f8..6fdd7da 100644 --- a/source/services/tasks/tasks.ts +++ b/source/services/tasks/tasks.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import * as fs from 'fs'; import { DocumentClient } from 'aws-sdk/clients/dynamodb'; diff --git a/source/services/users/app.ts b/source/services/users/app.ts index 978ab10..e0889df 100644 --- a/source/services/users/app.ts +++ b/source/services/users/app.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import * as express from 'express'; import * as bodyParser from 'body-parser'; diff --git a/source/services/users/index.ts b/source/services/users/index.ts index 3cdfaf3..6ef888b 100644 --- a/source/services/users/index.ts +++ b/source/services/users/index.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import { Context } from 'aws-lambda'; import { createServer, proxy } from 'aws-serverless-express'; diff --git a/source/services/users/users.ts b/source/services/users/users.ts index f13c659..643ffb1 100644 --- a/source/services/users/users.ts +++ b/source/services/users/users.ts @@ -1,19 +1,18 @@ -/************************************************************************************ - * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * - * * - * Permission is hereby granted, free of charge, to any person obtaining a copy of * - * this software and associated documentation files (the "Software"), to deal in * - * the Software without restriction, including without limitation the rights to * - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * - * the Software, and to permit persons to whom the Software is furnished to do so. * - * * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * - * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * - * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * - ***********************************************************************************/ +/***************************************************************************** + * 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. * + * A copy of the License is located 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. * + ****************************************************************************/ import * as AWS from 'aws-sdk'; import { factory } from '../logger';