diff --git a/modules/storage/efs/app.py b/modules/storage/efs/app.py index d020c8ca..49b6c6f1 100644 --- a/modules/storage/efs/app.py +++ b/modules/storage/efs/app.py @@ -1,3 +1,6 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + import os import aws_cdk @@ -16,13 +19,13 @@ efs_removal_policy = os.getenv("SEEDFARMER_PARAMETER_RETENTION_TYPE", "DESTROY") if len(f"{project_name}-{deployment_name}") > 36: - raise Exception("This module cannot support a project+deployment name character length greater than 35") + raise ValueError("This module cannot support a project+deployment name character length greater than 35") if not vpc_id: - raise Exception("missing input parameter vpc-id") + raise ValueError("missing input parameter vpc-id") if efs_removal_policy not in ["DESTROY", "RETAIN"]: - raise Exception("The only RETENTION_TYPE values accepted are 'DESTROY' and 'RETAIN' ") + raise ValueError("The only RETENTION_TYPE values accepted are 'DESTROY' and 'RETAIN' ") app = App() diff --git a/modules/storage/efs/stack.py b/modules/storage/efs/stack.py index 7133734d..cb5aa3be 100644 --- a/modules/storage/efs/stack.py +++ b/modules/storage/efs/stack.py @@ -1,3 +1,6 @@ +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 + import os from typing import Any, cast diff --git a/modules/storage/efs/tests/test_app.py b/modules/storage/efs/tests/test_app.py index d11b01b6..add9951a 100644 --- a/modules/storage/efs/tests/test_app.py +++ b/modules/storage/efs/tests/test_app.py @@ -1,16 +1,5 @@ -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"). -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 import os import sys diff --git a/modules/storage/efs/tests/test_stack.py b/modules/storage/efs/tests/test_stack.py index 5fca44d7..f0e5d068 100644 --- a/modules/storage/efs/tests/test_stack.py +++ b/modules/storage/efs/tests/test_stack.py @@ -1,16 +1,5 @@ -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"). -# You may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 import os import sys