Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
02c98dd
Adding cfn-lint optional parameter to SAM validate command
cdavidxu-hub Nov 25, 2022
e5de168
Cfn-lint optional parameter SAM validate make pr changes
cdavidxu-hub Nov 25, 2022
6543447
Fix make pr and broken tests
cdavidxu-hub Nov 28, 2022
4a3ec3f
Merge branch 'aws:develop' into develop
cdavidxu-hub Nov 28, 2022
d0e6948
Merge branch 'aws:develop' into develop
cdavidxu-hub Dec 2, 2022
949307d
Add Click error handling and allow config params
cdavidxu-hub Dec 2, 2022
aad36c6
Merge branch 'aws:develop' into develop
cdavidxu-hub Dec 6, 2022
b2e4686
Add unit and integration test
cdavidxu-hub Dec 6, 2022
d896752
Merge branch 'aws:develop' into develop
cdavidxu-hub Dec 7, 2022
9c57c5b
fix formatting and region exceptions
cdavidxu-hub Dec 7, 2022
32df182
Merge branch 'aws:develop' into develop
cdavidxu-hub Dec 8, 2022
ac52c74
Add integ unhappy path integ test and fix comments
cdavidxu-hub Dec 8, 2022
dc04436
Merge branch 'aws:develop' into develop
cdavidxu-hub Dec 9, 2022
35dc28f
Fix: remove local path string from test
cdavidxu-hub Dec 9, 2022
fd41d40
Merge branch 'aws:develop' into develop
cdavidxu-hub Dec 13, 2022
9fbfa24
generalize region validation and add license info
cdavidxu-hub Dec 13, 2022
5430d5e
Fix licensing and dynamic installer
cdavidxu-hub Dec 13, 2022
4b0f45f
Merge branch 'develop' into develop
mndeveci Dec 14, 2022
08872ca
Added generalized region validation tests
cdavidxu-hub Dec 14, 2022
cb70eb9
Fix unit tests and change output string
cdavidxu-hub Dec 14, 2022
060dcd3
Add valid region test, fix formatting
cdavidxu-hub Dec 14, 2022
fa7e409
Add no region test
cdavidxu-hub Dec 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions installer/assets/THIRD-PARTY-LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
** docker; version 4.2.0 -- https://pypi.org/project/docker/
** Importlib-metadata; version 4.11.3 -- https://importlib-metadata.readthedocs.io/en/latest/
** libcrypto; version 1.1 -- https://www.openssl.org/
** pbr; version 5.11.0 -- https://pypi.org/project/pbr/
** python-request; version 2.25.1 -- https://pypi.python.org/pypi/requests/2.25.1
** regex; version 2021.9.30 -- https://bitbucket.org/mrabarnett/mrab-regex/src/hg/
** s3transfer; version 0.3.6 -- https://github.com/boto/s3transfer
Expand Down Expand Up @@ -797,6 +798,138 @@ modification, are permitted provided that the following conditions are met:

------

** networkx; version 2.6.3 -- https://pypi.org/project/networkx/
Copyright (c) 2022, Aric Hagberg. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

#. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

#. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with
the distribution.

#. Neither the name of the copyright holder nor the names of the
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

#. THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

------

** jsonpointer; version 2.3 -- https://pypi.org/project/jsonpointer/
Copyright (c) 2022, Stefan Kögl. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

#. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

#. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with
the distribution.

#. Neither the name of the copyright holder nor the names of the
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

#. THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

------

** jsonpickle; version 3.0.0 -- https://pypi.org/project/jsonpickle/
Copyright (c) 2022, David Aguilar. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

#. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

#. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with
the distribution.

#. Neither the name of the copyright holder nor the names of the
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

#. THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

------

** jsonpatch; version 1.32 -- https://pypi.org/project/jsonpickle/
Copyright (c) 2021-2022, Stefan Kögl. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

#. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

#. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided with
the distribution.

#. Neither the name of the copyright holder nor the names of the
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

#. THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

------

** python-chardet; version 3.0.4 -- https://pypi.org/project/chardet/
Copyright (C) 1991, 1999 Free Software Foundation, Inc.

Expand Down Expand Up @@ -1851,6 +1984,10 @@ client/archive/v0.57.0.tar.gz

** attrs; version 20.3.0 -- https://pypi.org/project/attrs/
Copyright (c) 2015 Hynek Schlawack
** cfn-lint; version 0.72.2 -- https://pypi.org/project/cfn-lint/
** jschema-to-python; version 1.2.3 -- https://pypi.org/project/jschema-to-python/
** junit-xml; version 1.9 -- https://pypi.org/project/junit-xml/
** sarif-om; version 1.0.4 https://pypi.org/project/sarif-om/
** wheel; version 0.36.2 -- https://github.com/pypa/wheel
"wheel" copyright (c) 2012-2014 Daniel Holth <dholth@fastmail.fm> and
contributors.
Expand Down
1 change: 1 addition & 0 deletions installer/pyinstaller/hidden_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
"pkg_resources.py2_warn",
"aws_lambda_builders.workflows",
"configparser",
"cfnlint.rules"
]
3 changes: 3 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ typing_extensions==3.10.0.0
regex==2021.9.30
# NOTE: tzlocal is not a direct dependency of SAM CLI, but pin to 3.0 as 4.0 break appveyor jobs
tzlocal==3.0

#Adding cfn-lint dependency for SAM validate
cfn-lint==0.72.2
Comment thread
cdavidxu-hub marked this conversation as resolved.
57 changes: 52 additions & 5 deletions requirements/reproducible-linux.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with python 3.7
# To update, run:
# This file is autogenerated by pip-compile with Python 3.7
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes --output-file=requirements/reproducible-linux.txt
#
Expand All @@ -11,7 +11,10 @@ arrow==1.0.3 \
attrs==20.3.0 \
--hash=sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6 \
--hash=sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700
# via jsonschema
# via
# jschema-to-python
# jsonschema
# sarif-om
aws-lambda-builders==1.23.1 \
--hash=sha256:4db4133decf149c5b2daa0959db0f6e5563a9763beac0e25005a90c2ce7abe48 \
--hash=sha256:dda6f7e04bc77120c206ef5269a0c17bbcecacf065865248d31c1c80f325a343
Expand All @@ -20,7 +23,9 @@ aws-sam-translator==1.55.0 \
--hash=sha256:08e182e76d6fabc13ce2f38b8a3932b3131407c6ad29ec2849ef3d9a41576b94 \
--hash=sha256:93dc74614ab291c86be681e025679d08f4fa685ed6b55d410f62f2f235012205 \
--hash=sha256:e86a67b87329a0de7d531d33257d1a448d0d6ecd84aee058d084957f28a8e4b1
# via aws-sam-cli (setup.py)
# via
# aws-sam-cli (setup.py)
# cfn-lint
backports-zoneinfo==0.2.1 \
--hash=sha256:17746bd546106fa389c51dbea67c8b7c8f0d14b5526a579ca6ccf5ed72c526cf \
--hash=sha256:1b13e654a55cd45672cb54ed12148cd33628f672548f373963b0bff67b217328 \
Expand Down Expand Up @@ -126,6 +131,10 @@ cffi==1.15.1 \
--hash=sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01 \
--hash=sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0
# via cryptography
cfn-lint==0.72.2 \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any dependencies which is dynamically imported? If so we might need to add them to hidden imports information for pyinstaller.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--hash=sha256:1117a0a50899807021fb7b87ebcfb04eddda06269d9a45c7dbbba3bc7c4631f5 \
--hash=sha256:d7ef1658687cf119adcf6ec312f28b5adc312d80293a54cdd5c140e2695a243c
# via aws-sam-cli (setup.py)
chardet==3.0.4 \
--hash=sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae \
--hash=sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691
Expand Down Expand Up @@ -196,6 +205,7 @@ importlib-metadata==4.11.3 \
--hash=sha256:ea4c597ebf37142f827b8f39299579e31685c31d3a438b59f469406afd0f2539
# via
# click
# jsonpickle
# jsonschema
itsdangerous==2.1.2 \
--hash=sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44 \
Expand All @@ -219,10 +229,31 @@ jmespath==0.10.0 \
# aws-sam-cli (setup.py)
# boto3
# botocore
jschema-to-python==1.2.3 \
--hash=sha256:76ff14fe5d304708ccad1284e4b11f96a658949a31ee7faed9e0995279549b91 \
--hash=sha256:8a703ca7604d42d74b2815eecf99a33359a8dccbb80806cce386d5e2dd992b05
# via cfn-lint
jsonpatch==1.32 \
--hash=sha256:26ac385719ac9f54df8a2f0827bb8253aa3ea8ab7b3368457bcdb8c14595a397 \
--hash=sha256:b6ddfe6c3db30d81a96aaeceb6baf916094ffa23d7dd5fa2c13e13f8b6e600c2
# via cfn-lint
jsonpickle==3.0.0 \
--hash=sha256:504586e5c0fd52fd76a56f86c36f8c4d29778bdef92dc06d38ca6e2e9fc4f090 \
--hash=sha256:7c4b13d595ff3520148ed870b9f5917023ebdc55c9ec0cb695688fdc16e90c3e
# via jschema-to-python
jsonpointer==2.3 \
--hash=sha256:51801e558539b4e9cd268638c078c6c5746c9ac96bc38152d443400e4f3793e9 \
--hash=sha256:97cba51526c829282218feb99dab1b1e6bdf8efd1c43dc9d57be093c0d69c99a
# via jsonpatch
jsonschema==3.2.0 \
--hash=sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163 \
--hash=sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a
# via aws-sam-translator
# via
# aws-sam-translator
# cfn-lint
junit-xml==1.9 \
--hash=sha256:ec5ca1a55aefdd76d28fcc0b135251d156c7106fa979686a4b48d62b761b4732
# via cfn-lint
markupsafe==2.1.1 \
--hash=sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003 \
--hash=sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88 \
Expand Down Expand Up @@ -265,6 +296,16 @@ markupsafe==2.1.1 \
--hash=sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a \
--hash=sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7
# via jinja2
networkx==2.6.3 \
--hash=sha256:80b6b89c77d1dfb64a4c7854981b60aeea6360ac02c6d4e4913319e0a313abef \
--hash=sha256:c0946ed31d71f1b732b5aaa6da5a0388a345019af232ce2f49c766e2d6795c51
# via cfn-lint
pbr==5.11.0 \
--hash=sha256:b97bc6695b2aff02144133c2e7399d5885223d42b7912ffaec2ca3898e673bfe \
--hash=sha256:db2317ff07c84c4c63648c9064a79fe9d9f5c7ce85a9099d4b6258b3db83225a
# via
# jschema-to-python
# sarif-om
pycparser==2.21 \
--hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \
--hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206
Expand Down Expand Up @@ -322,6 +363,7 @@ pyyaml==5.4.1 \
--hash=sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0
# via
# aws-sam-cli (setup.py)
# cfn-lint
# cookiecutter
# serverlessrepo
regex==2021.9.30 \
Expand Down Expand Up @@ -380,6 +422,10 @@ s3transfer==0.5.0 \
--hash=sha256:50ed823e1dc5868ad40c8dc92072f757aa0e653a192845c94a3b676f4a62da4c \
--hash=sha256:9c1dc369814391a6bda20ebbf4b70a0f34630592c9aa520856bf384916af2803
# via boto3
sarif-om==1.0.4 \
--hash=sha256:539ef47a662329b1c8502388ad92457425e95dc0aaaf995fe46f4984c4771911 \
--hash=sha256:cd5f416b3083e00d402a92e449a7ff67af46f11241073eea0461802a3b5aef98
# via cfn-lint
serverlessrepo==0.1.10 \
--hash=sha256:671f48038123f121437b717ed51f253a55775590f00fbab6fbc6a01f8d05c017 \
--hash=sha256:b99c69be8ce87ccc48103fbe371ba7b148c3374c57862e59118c402522e5ed52
Expand All @@ -390,6 +436,7 @@ six==1.15.0 \
# via
# docker
# jsonschema
# junit-xml
# python-dateutil
# serverlessrepo
# websocket-client
Expand Down
9 changes: 9 additions & 0 deletions samcli/cli/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ def region_option(f):

def callback(ctx, param, value):
state = ctx.ensure_object(Context)
from botocore import exceptions, utils
from samcli.commands.exceptions import RegionError

try:
utils.validate_region_name(value)
except exceptions.InvalidRegionError as ex:
raise RegionError(
message=f"Provided region: {value} doesn't match a supported format", wrapped_from=ex.__class__.__name__
) from ex
state.region = value
return value

Expand Down
Loading