sovlens 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sovlens-0.3.1/LICENSE +179 -0
- sovlens-0.3.1/PKG-INFO +132 -0
- sovlens-0.3.1/README.md +105 -0
- sovlens-0.3.1/pyproject.toml +41 -0
- sovlens-0.3.1/setup.cfg +4 -0
- sovlens-0.3.1/src/sovlens/__init__.py +1 -0
- sovlens-0.3.1/src/sovlens/catalog.py +107 -0
- sovlens-0.3.1/src/sovlens/cli.py +97 -0
- sovlens-0.3.1/src/sovlens/data/esc_services.json +345 -0
- sovlens-0.3.1/src/sovlens/deps.py +171 -0
- sovlens-0.3.1/src/sovlens/inventory.py +119 -0
- sovlens-0.3.1/src/sovlens/report.py +102 -0
- sovlens-0.3.1/src/sovlens/runner.py +54 -0
- sovlens-0.3.1/src/sovlens.egg-info/PKG-INFO +132 -0
- sovlens-0.3.1/src/sovlens.egg-info/SOURCES.txt +18 -0
- sovlens-0.3.1/src/sovlens.egg-info/dependency_links.txt +1 -0
- sovlens-0.3.1/src/sovlens.egg-info/entry_points.txt +2 -0
- sovlens-0.3.1/src/sovlens.egg-info/requires.txt +5 -0
- sovlens-0.3.1/src/sovlens.egg-info/top_level.txt +1 -0
- sovlens-0.3.1/tests/test_scan.py +63 -0
sovlens-0.3.1/LICENSE
ADDED
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2026 Sovlens
|
sovlens-0.3.1/PKG-INFO
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sovlens
|
|
3
|
+
Version: 0.3.1
|
|
4
|
+
Summary: Read-only readiness scanner for the AWS European Sovereign Cloud
|
|
5
|
+
Author-email: Sovlens <hello@sovlens.dev>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://sovlens.dev
|
|
8
|
+
Project-URL: Source, https://github.com/sovlens/sovlens
|
|
9
|
+
Project-URL: Issues, https://github.com/sovlens/sovlens/issues
|
|
10
|
+
Project-URL: ESC services list, https://sovlens.dev/esc-services
|
|
11
|
+
Keywords: aws,european sovereign cloud,aws-eusc,eusc-de-east-1,migration,sovereignty,cli
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: System Administrators
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Topic :: System :: Systems Administration
|
|
19
|
+
Requires-Python: >=3.10
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: boto3[crt]>=1.40
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest; extra == "dev"
|
|
25
|
+
Requires-Dist: moto[all]; extra == "dev"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# Sovlens
|
|
29
|
+
|
|
30
|
+
[](https://github.com/sovlens/sovlens/actions/workflows/test.yml)
|
|
31
|
+
[](LICENSE)
|
|
32
|
+
|
|
33
|
+
**What in this AWS account will not move to the AWS European Sovereign Cloud as-is?**
|
|
34
|
+
|
|
35
|
+
The AWS European Sovereign Cloud (ESC) is a separate partition, `aws-eusc`, with its own region (`eusc-de-east-1`), accounts and IAM. Moving there is not a region switch: some services are missing, and anything that trusts or talks to another account stops working at the partition boundary.
|
|
36
|
+
|
|
37
|
+
Sovlens is a read-only CLI that scans one AWS account and tells you:
|
|
38
|
+
|
|
39
|
+
- **Which services you use** and whether each one is available in the ESC: Ready, Verify or Wait.
|
|
40
|
+
- **How many dependencies cross the partition boundary**, however the infrastructure was built (Terraform, CloudFormation or the console):
|
|
41
|
+
- roles trusted by third-party vendors (roles with an ExternalId) and by accounts outside your organization,
|
|
42
|
+
- roles trusted by other accounts in your organization,
|
|
43
|
+
- membership in an AWS Organization,
|
|
44
|
+
- SAML and OIDC identity providers.
|
|
45
|
+
|
|
46
|
+
It writes a local HTML and JSON report. Nothing leaves your machine.
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
|
|
50
|
+
*Sample report from a test account.*
|
|
51
|
+
|
|
52
|
+
## Quick start
|
|
53
|
+
|
|
54
|
+
Requires Python 3.10 or newer and AWS credentials with read-only access.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
pipx install sovlens # or: pip install sovlens
|
|
58
|
+
sovlens scan --profile my-profile
|
|
59
|
+
open sovlens-report.html
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
From source:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
git clone https://github.com/sovlens/sovlens && cd sovlens
|
|
66
|
+
python3 -m venv .venv && source .venv/bin/activate
|
|
67
|
+
pip install .
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
| Option | Meaning |
|
|
71
|
+
| --- | --- |
|
|
72
|
+
| `--profile` | AWS profile to use |
|
|
73
|
+
| `--regions eu-central-1,eu-west-1` | Regions to scan (default: all enabled regions, scanned in parallel) |
|
|
74
|
+
| `--target eusc-de-east-1` | Target ESC region |
|
|
75
|
+
| `--report html\|json\|both` | Report format (default: both) |
|
|
76
|
+
| `--out name` | Report file name without extension |
|
|
77
|
+
| `--quiet` | No progress output |
|
|
78
|
+
|
|
79
|
+
A scan of all enabled regions usually takes a few minutes.
|
|
80
|
+
|
|
81
|
+
## Permissions
|
|
82
|
+
|
|
83
|
+
Read-only. The minimal policy is in [`iam/sovlens-readonly-policy.json`](iam/sovlens-readonly-policy.json); `ReadOnlyAccess` or `SecurityAudit` also work. Sovlens never calls an API that creates, changes or deletes anything.
|
|
84
|
+
|
|
85
|
+
Run it from an account that can call `organizations:ListAccounts` (the management account or a delegated administrator) so it can tell your own accounts from external ones. Otherwise every other account counts as external, and the report says so.
|
|
86
|
+
|
|
87
|
+
## How the verdicts work
|
|
88
|
+
|
|
89
|
+
| Status | Meaning |
|
|
90
|
+
| --- | --- |
|
|
91
|
+
| **Ready** | Listed in the [ESC User Guide](https://docs.aws.eu/esc/latest/userguide/services.html), or has an ESC endpoint in the AWS SDK. |
|
|
92
|
+
| **Verify** | Not covered by either source. Check AWS Capabilities by Region. |
|
|
93
|
+
| **Wait** | A widely used service that is not in the ESC User Guide and has no ESC endpoint, such as CloudFront. |
|
|
94
|
+
|
|
95
|
+
The service list is in [`src/sovlens/data/esc_services.json`](src/sovlens/data/esc_services.json), with the date it was last checked. It follows the ESC User Guide rather than SDK endpoint data, because the endpoint data in botocore has no entry for partition-wide services such as IAM, Organizations and Route 53. More on that, and the full list, at [sovlens.dev/esc-services](https://sovlens.dev/esc-services).
|
|
96
|
+
|
|
97
|
+
Found a wrong verdict? Open an issue with the "Service availability correction" template and a link to the AWS source.
|
|
98
|
+
|
|
99
|
+
Dependencies are grouped as **Outside your control** (a vendor or another company must act), **Rebuild in the sovereign cloud** (you recreate it in the ESC) and **Code to change** (from your Terraform or CloudFormation files, Pro only).
|
|
100
|
+
|
|
101
|
+
## Free and Pro
|
|
102
|
+
|
|
103
|
+
This repository is the free, open-source edition. [Sovlens Pro](https://sovlens.dev) is a separate add-on: install it next to this package and the same `sovlens scan` command produces the full report.
|
|
104
|
+
|
|
105
|
+
| | Free (this repo) | Pro |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| Services in use, with verdicts | Yes | Yes |
|
|
108
|
+
| Cross-partition dependencies | Number per type | Every resource, with a fix |
|
|
109
|
+
| Vendor behind each outside account, with its ESC status | No | Yes |
|
|
110
|
+
| Resource policies (S3, KMS, SQS, SNS) | No | Yes |
|
|
111
|
+
| S3 replication, Lambda layers, VPC peering, Transit Gateway, VPN, Direct Connect | No | Yes |
|
|
112
|
+
| Hardcoded `arn:aws:` in Terraform and CloudFormation (`--iac`) | No | Yes |
|
|
113
|
+
| Organization-wide scan, PDF export | No | Planned |
|
|
114
|
+
|
|
115
|
+
## Known limits
|
|
116
|
+
|
|
117
|
+
- Service-level only. Feature-level differences (for example S3 Express One Zone or STS global endpoints) are not checked yet. The ESC User Guide lists them per service.
|
|
118
|
+
- Inventory uses the Resource Groups Tagging API plus direct checks for core services. Resources of other services that were never tagged can be missed.
|
|
119
|
+
- One account per scan.
|
|
120
|
+
|
|
121
|
+
## Development
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
pip install -e ".[dev]"
|
|
125
|
+
pytest
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Security issues: [SECURITY.md](SECURITY.md).
|
|
129
|
+
|
|
130
|
+
## License
|
|
131
|
+
|
|
132
|
+
Apache-2.0. Sovlens is independent and not affiliated with, endorsed by or sponsored by Amazon Web Services. It assesses technical readiness only and is not legal or compliance advice.
|
sovlens-0.3.1/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Sovlens
|
|
2
|
+
|
|
3
|
+
[](https://github.com/sovlens/sovlens/actions/workflows/test.yml)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
**What in this AWS account will not move to the AWS European Sovereign Cloud as-is?**
|
|
7
|
+
|
|
8
|
+
The AWS European Sovereign Cloud (ESC) is a separate partition, `aws-eusc`, with its own region (`eusc-de-east-1`), accounts and IAM. Moving there is not a region switch: some services are missing, and anything that trusts or talks to another account stops working at the partition boundary.
|
|
9
|
+
|
|
10
|
+
Sovlens is a read-only CLI that scans one AWS account and tells you:
|
|
11
|
+
|
|
12
|
+
- **Which services you use** and whether each one is available in the ESC: Ready, Verify or Wait.
|
|
13
|
+
- **How many dependencies cross the partition boundary**, however the infrastructure was built (Terraform, CloudFormation or the console):
|
|
14
|
+
- roles trusted by third-party vendors (roles with an ExternalId) and by accounts outside your organization,
|
|
15
|
+
- roles trusted by other accounts in your organization,
|
|
16
|
+
- membership in an AWS Organization,
|
|
17
|
+
- SAML and OIDC identity providers.
|
|
18
|
+
|
|
19
|
+
It writes a local HTML and JSON report. Nothing leaves your machine.
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
*Sample report from a test account.*
|
|
24
|
+
|
|
25
|
+
## Quick start
|
|
26
|
+
|
|
27
|
+
Requires Python 3.10 or newer and AWS credentials with read-only access.
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
pipx install sovlens # or: pip install sovlens
|
|
31
|
+
sovlens scan --profile my-profile
|
|
32
|
+
open sovlens-report.html
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
From source:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
git clone https://github.com/sovlens/sovlens && cd sovlens
|
|
39
|
+
python3 -m venv .venv && source .venv/bin/activate
|
|
40
|
+
pip install .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
| Option | Meaning |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| `--profile` | AWS profile to use |
|
|
46
|
+
| `--regions eu-central-1,eu-west-1` | Regions to scan (default: all enabled regions, scanned in parallel) |
|
|
47
|
+
| `--target eusc-de-east-1` | Target ESC region |
|
|
48
|
+
| `--report html\|json\|both` | Report format (default: both) |
|
|
49
|
+
| `--out name` | Report file name without extension |
|
|
50
|
+
| `--quiet` | No progress output |
|
|
51
|
+
|
|
52
|
+
A scan of all enabled regions usually takes a few minutes.
|
|
53
|
+
|
|
54
|
+
## Permissions
|
|
55
|
+
|
|
56
|
+
Read-only. The minimal policy is in [`iam/sovlens-readonly-policy.json`](iam/sovlens-readonly-policy.json); `ReadOnlyAccess` or `SecurityAudit` also work. Sovlens never calls an API that creates, changes or deletes anything.
|
|
57
|
+
|
|
58
|
+
Run it from an account that can call `organizations:ListAccounts` (the management account or a delegated administrator) so it can tell your own accounts from external ones. Otherwise every other account counts as external, and the report says so.
|
|
59
|
+
|
|
60
|
+
## How the verdicts work
|
|
61
|
+
|
|
62
|
+
| Status | Meaning |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| **Ready** | Listed in the [ESC User Guide](https://docs.aws.eu/esc/latest/userguide/services.html), or has an ESC endpoint in the AWS SDK. |
|
|
65
|
+
| **Verify** | Not covered by either source. Check AWS Capabilities by Region. |
|
|
66
|
+
| **Wait** | A widely used service that is not in the ESC User Guide and has no ESC endpoint, such as CloudFront. |
|
|
67
|
+
|
|
68
|
+
The service list is in [`src/sovlens/data/esc_services.json`](src/sovlens/data/esc_services.json), with the date it was last checked. It follows the ESC User Guide rather than SDK endpoint data, because the endpoint data in botocore has no entry for partition-wide services such as IAM, Organizations and Route 53. More on that, and the full list, at [sovlens.dev/esc-services](https://sovlens.dev/esc-services).
|
|
69
|
+
|
|
70
|
+
Found a wrong verdict? Open an issue with the "Service availability correction" template and a link to the AWS source.
|
|
71
|
+
|
|
72
|
+
Dependencies are grouped as **Outside your control** (a vendor or another company must act), **Rebuild in the sovereign cloud** (you recreate it in the ESC) and **Code to change** (from your Terraform or CloudFormation files, Pro only).
|
|
73
|
+
|
|
74
|
+
## Free and Pro
|
|
75
|
+
|
|
76
|
+
This repository is the free, open-source edition. [Sovlens Pro](https://sovlens.dev) is a separate add-on: install it next to this package and the same `sovlens scan` command produces the full report.
|
|
77
|
+
|
|
78
|
+
| | Free (this repo) | Pro |
|
|
79
|
+
| --- | --- | --- |
|
|
80
|
+
| Services in use, with verdicts | Yes | Yes |
|
|
81
|
+
| Cross-partition dependencies | Number per type | Every resource, with a fix |
|
|
82
|
+
| Vendor behind each outside account, with its ESC status | No | Yes |
|
|
83
|
+
| Resource policies (S3, KMS, SQS, SNS) | No | Yes |
|
|
84
|
+
| S3 replication, Lambda layers, VPC peering, Transit Gateway, VPN, Direct Connect | No | Yes |
|
|
85
|
+
| Hardcoded `arn:aws:` in Terraform and CloudFormation (`--iac`) | No | Yes |
|
|
86
|
+
| Organization-wide scan, PDF export | No | Planned |
|
|
87
|
+
|
|
88
|
+
## Known limits
|
|
89
|
+
|
|
90
|
+
- Service-level only. Feature-level differences (for example S3 Express One Zone or STS global endpoints) are not checked yet. The ESC User Guide lists them per service.
|
|
91
|
+
- Inventory uses the Resource Groups Tagging API plus direct checks for core services. Resources of other services that were never tagged can be missed.
|
|
92
|
+
- One account per scan.
|
|
93
|
+
|
|
94
|
+
## Development
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
pip install -e ".[dev]"
|
|
98
|
+
pytest
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Security issues: [SECURITY.md](SECURITY.md).
|
|
102
|
+
|
|
103
|
+
## License
|
|
104
|
+
|
|
105
|
+
Apache-2.0. Sovlens is independent and not affiliated with, endorsed by or sponsored by Amazon Web Services. It assesses technical readiness only and is not legal or compliance advice.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sovlens"
|
|
7
|
+
version = "0.3.1"
|
|
8
|
+
description = "Read-only readiness scanner for the AWS European Sovereign Cloud"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "Apache-2.0" }
|
|
11
|
+
authors = [{ name = "Sovlens", email = "hello@sovlens.dev" }]
|
|
12
|
+
keywords = ["aws", "european sovereign cloud", "aws-eusc", "eusc-de-east-1", "migration", "sovereignty", "cli"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Environment :: Console",
|
|
16
|
+
"Intended Audience :: System Administrators",
|
|
17
|
+
"License :: OSI Approved :: Apache Software License",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Topic :: System :: Systems Administration",
|
|
21
|
+
]
|
|
22
|
+
requires-python = ">=3.10"
|
|
23
|
+
dependencies = ["boto3[crt]>=1.40"]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
Homepage = "https://sovlens.dev"
|
|
27
|
+
Source = "https://github.com/sovlens/sovlens"
|
|
28
|
+
Issues = "https://github.com/sovlens/sovlens/issues"
|
|
29
|
+
"ESC services list" = "https://sovlens.dev/esc-services"
|
|
30
|
+
|
|
31
|
+
[project.optional-dependencies]
|
|
32
|
+
dev = ["pytest", "moto[all]"]
|
|
33
|
+
|
|
34
|
+
[project.scripts]
|
|
35
|
+
sovlens = "sovlens.cli:main"
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.packages.find]
|
|
38
|
+
where = ["src"]
|
|
39
|
+
|
|
40
|
+
[tool.setuptools.package-data]
|
|
41
|
+
sovlens = ["data/*.json"]
|
sovlens-0.3.1/setup.cfg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.1"
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"""Which services exist in the target partition.
|
|
2
|
+
|
|
3
|
+
Sources, in order:
|
|
4
|
+
1. Manual overrides (catalog/overrides.json).
|
|
5
|
+
2. The service list of the AWS European Sovereign Cloud User Guide (catalog/esc_services.json).
|
|
6
|
+
Widely used services that the guide does not cover are reported as "wait".
|
|
7
|
+
3. The endpoint data shipped with botocore. It misses partition-wide services such as IAM,
|
|
8
|
+
Organizations and Route 53, so it is only a fallback.
|
|
9
|
+
Anything else is reported as "verify", never as a hard "no".
|
|
10
|
+
"""
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import json
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
import botocore
|
|
17
|
+
import botocore.session
|
|
18
|
+
|
|
19
|
+
TARGET_PARTITION = "aws-eusc"
|
|
20
|
+
|
|
21
|
+
# Services that are operated outside a single regional endpoint in the
|
|
22
|
+
# commercial partition. Their presence always deserves a manual look.
|
|
23
|
+
GLOBAL_SERVICES = {"cloudfront", "route53", "globalaccelerator", "shield", "waf"}
|
|
24
|
+
ESC_SERVICES = Path(__file__).resolve().parent / "data" / "esc_services.json"
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Catalog:
|
|
28
|
+
def __init__(self, target_region: str, overrides_path: Path | None = None):
|
|
29
|
+
self.target_region = target_region
|
|
30
|
+
self.botocore_version = botocore.__version__
|
|
31
|
+
self._session = botocore.session.get_session()
|
|
32
|
+
self._available: set[str] = set()
|
|
33
|
+
self._known: set[str] = set()
|
|
34
|
+
self._build()
|
|
35
|
+
guide = json.loads(ESC_SERVICES.read_text())
|
|
36
|
+
self.guide_source, self.guide_checked = guide["source"], guide["checked"]
|
|
37
|
+
self.guide_available = {n for names in guide["services"].values() for n in names}
|
|
38
|
+
self.guide_missing = dict(guide["not_listed"])
|
|
39
|
+
self.guide_notes = dict(guide.get("notes", {}))
|
|
40
|
+
self.override_available: set[str] = set()
|
|
41
|
+
self.override_unavailable: set[str] = set()
|
|
42
|
+
if overrides_path and overrides_path.exists():
|
|
43
|
+
data = json.loads(overrides_path.read_text())
|
|
44
|
+
self.override_available = set(data.get("available", []))
|
|
45
|
+
self.override_unavailable = set(data.get("unavailable", []))
|
|
46
|
+
|
|
47
|
+
def _namespaces(self, service_name: str) -> set[str]:
|
|
48
|
+
"""ARN namespaces a botocore service can appear under."""
|
|
49
|
+
names = {service_name}
|
|
50
|
+
try:
|
|
51
|
+
meta = self._session.get_service_model(service_name).metadata
|
|
52
|
+
except Exception:
|
|
53
|
+
return names
|
|
54
|
+
for key in ("signingName", "endpointPrefix"):
|
|
55
|
+
if meta.get(key):
|
|
56
|
+
names.add(meta[key])
|
|
57
|
+
return names
|
|
58
|
+
|
|
59
|
+
def _build(self) -> None:
|
|
60
|
+
for svc in self._session.get_available_services():
|
|
61
|
+
names = self._namespaces(svc)
|
|
62
|
+
self._known |= names
|
|
63
|
+
regions = self._session.get_available_regions(
|
|
64
|
+
svc, partition_name=TARGET_PARTITION
|
|
65
|
+
)
|
|
66
|
+
if self.target_region in regions:
|
|
67
|
+
self._available |= names
|
|
68
|
+
|
|
69
|
+
def known(self, namespace: str) -> bool:
|
|
70
|
+
return (namespace in self._known or namespace in GLOBAL_SERVICES
|
|
71
|
+
or namespace in self.guide_available or namespace in self.guide_missing
|
|
72
|
+
or namespace in self.override_available or namespace in self.override_unavailable)
|
|
73
|
+
|
|
74
|
+
def status(self, namespace: str) -> str:
|
|
75
|
+
"""Return 'ready', 'wait' or 'verify' for an ARN service namespace."""
|
|
76
|
+
if namespace in self.override_unavailable:
|
|
77
|
+
return "wait"
|
|
78
|
+
if namespace in self.override_available:
|
|
79
|
+
return "ready"
|
|
80
|
+
if namespace in self.guide_available:
|
|
81
|
+
return "ready"
|
|
82
|
+
if namespace in self.guide_missing:
|
|
83
|
+
return "wait"
|
|
84
|
+
if namespace in GLOBAL_SERVICES:
|
|
85
|
+
return "verify"
|
|
86
|
+
if namespace in self._available:
|
|
87
|
+
return "ready"
|
|
88
|
+
return "verify"
|
|
89
|
+
|
|
90
|
+
def reason(self, namespace: str) -> str:
|
|
91
|
+
if namespace in self.override_unavailable:
|
|
92
|
+
return "Marked unavailable in catalog overrides"
|
|
93
|
+
if namespace in self.override_available:
|
|
94
|
+
return "Marked available in catalog overrides"
|
|
95
|
+
if namespace in self.guide_available:
|
|
96
|
+
return f"Listed in the AWS European Sovereign Cloud User Guide (checked {self.guide_checked})"
|
|
97
|
+
if namespace in self.guide_missing:
|
|
98
|
+
note = self.guide_notes.get(namespace, "Check AWS Capabilities by Region for the roadmap.")
|
|
99
|
+
return (f"{self.guide_missing[namespace]} is not in the AWS European Sovereign Cloud User Guide "
|
|
100
|
+
f"(checked {self.guide_checked}) or the SDK endpoint data. {note}")
|
|
101
|
+
if namespace in GLOBAL_SERVICES:
|
|
102
|
+
return "Global or edge service: check how it is offered in the target partition"
|
|
103
|
+
if namespace in self._available:
|
|
104
|
+
return f"Endpoint listed for {self.target_region}"
|
|
105
|
+
if namespace in self._known:
|
|
106
|
+
return f"No endpoint listed for {self.target_region} in botocore {self.botocore_version}: verify against AWS Capabilities by Region"
|
|
107
|
+
return "Service not recognised: verify manually"
|