Skip to content

Commit 047cbba

Browse files
Copilotsgbaird
andcommitted
Add security best practices for AWS credentials and bucket access
Co-authored-by: sgbaird <45469701+sgbaird@users.noreply.github.com>
1 parent b192650 commit 047cbba

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/ac_training_lab/a1_cam/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ Key considerations:
3636
- **Bucket name**: Must be globally unique (e.g., `rpi-zero2w-toolhead-camera`)
3737
- **Object Ownership**: ACLs disabled (recommended)
3838
- **Block Public Access settings**:
39-
- Uncheck "Block *all* public access" if you need publicly accessible image URLs (as shown in the screenshot)
40-
- Note: For security, consider keeping public access blocked and using signed URLs or restricting access to specific IAM users
39+
- For enhanced security, keep "Block all public access" enabled (recommended)
40+
- If you need to access images from external systems, use IAM-based access controls or generate signed URLs rather than making the bucket public
41+
- Only uncheck public access if you fully understand the security implications and need publicly accessible URLs (as shown in the screenshot)
4142

4243
![S3 Public Access Settings](https://github.com/user-attachments/assets/fb694a7f-4dc0-4baf-a603-01bfa74d3165)
4344

@@ -90,7 +91,8 @@ Replace `your-bucket-name` with your actual bucket name.
9091

9192
4. Create access keys for this user and save them securely
9293
- You'll receive an `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`
93-
- **Important**: These credentials will only be shown once, so save them immediately
94+
- **Important**: These credentials will only be shown once, so save them immediately to a secure password manager
95+
- **Security best practice**: Rotate these credentials periodically and revoke them immediately if compromised
9496

9597
The a1_cam device generates URLs like:
9698
```
@@ -132,7 +134,11 @@ s3 = boto3.client(
132134
)
133135
```
134136

135-
**Note**: While boto3 also supports reading credentials from `~/.aws/credentials` or environment variables, this implementation explicitly passes them to keep all device secrets centralized in `my_secrets.py`.
137+
**Security considerations**:
138+
- The `my_secrets.py` file stores credentials in plaintext. Ensure proper file permissions: `chmod 600 my_secrets.py`
139+
- Keep your Raspberry Pi login credentials secure and use SSH key authentication
140+
- Consider restricting SSH access and using fail2ban or similar tools
141+
- While boto3 also supports reading credentials from `~/.aws/credentials` or environment variables, this implementation explicitly passes them to keep all device secrets centralized in `my_secrets.py`
136142

137143
### Additional Resources
138144

0 commit comments

Comments
 (0)