Skip to content

Commit 6c58d2a

Browse files
committed
docs(providers): give the aws-s3 STS example PyPI egress for boto3
The boto3 walkthrough ran pip install inside a sandbox attached only to the aws-s3 profile, which permits S3 egress but not PyPI, so the install would be blocked. Attach the built-in pypi profile so pip can reach PyPI, and note the custom-image alternative. Also delete the s3-curl sandbox (and the pypi provider) in the cleanup section. Signed-off-by: Russell Bryant <[email protected]>
1 parent 557221f commit 6c58d2a

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎examples/aws-s3-sts.md‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,16 @@ The status should show `refreshed` with an expiry ~1 hour from now.
158158

159159
### Using boto3 (Python)
160160

161+
boto3 is not in the base sandbox image, and the `aws-s3` profile allows only S3
162+
egress. Attach the built-in `pypi` profile so `pip` can reach PyPI (or bake
163+
boto3 into a custom sandbox image):
164+
161165
```shell
166+
openshell provider create --name pypi --type pypi --runtime-credentials
167+
162168
openshell sandbox create --name s3-smoke \
163169
--provider s3-test \
170+
--provider pypi \
164171
-- bash -c '
165172
export AWS_CA_BUNDLE=/etc/openshell-tls/ca-bundle.pem
166173
pip install boto3 -q 2>&1 | tail -1
@@ -249,8 +256,10 @@ in the environment.
249256
## 6. Clean up
250257

251258
```shell
252-
# Delete the sandbox
259+
# Delete the sandboxes and the pypi provider
253260
openshell sandbox delete s3-smoke
261+
openshell sandbox delete s3-curl
262+
openshell provider delete pypi
254263

255264
# Delete AWS resources
256265
aws s3 rb "s3://${BUCKET}" --force

0 commit comments

Comments
 (0)