Skip to content

Commit

Permalink
JavaScript (v3): Photo Analyzer - Block non-SSL requests to bucket. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cpyle0819 authored Sep 23, 2024
1 parent 376c52a commit 1311e5c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions javascriptv3/example_code/cross-services/photo_analyzer/stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@ Resources:
Ref: bucketforimages293BECA3
PolicyDocument:
Statement:
- Action: s3:*
Condition:
Bool:
aws:SecureTransport: "false"
Effect: Deny
Principal:
AWS: "*"
Resource:
- Fn::GetAtt:
- bucketforimages293BECA3
- Arn
- Fn::Join:
- ""
- - Fn::GetAtt:
- bucketforimages293BECA3
- Arn
- /*
- Action:
- s3:GetObject*
- s3:GetBucket*
Expand Down

0 comments on commit 1311e5c

Please sign in to comment.