Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
[feat] Use S3VPCE to prevent S3 access outside of VPC
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-tyler committed Apr 27, 2023
1 parent 1753e5e commit f2ee757
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,9 @@ Outputs:
Condition: isAppStreamAndCustomDomain
Value: !Ref Route53HostedZone

S3VpcEndpoint:
S3VPCE:
Description: S3 interface endpoint
Condition: isAppStream
Value: !Ref S3Endpoint
Value: !Ref S3Endpoint
Export:
Name: !Join [ '', [ Ref: Namespace, '-S3VPCE' ] ]
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ Resources:
- sagemaker:DescribeNotebookInstance
- sagemaker:StopNotebookInstance
Resource: '*'
- Effect: Deny
Action: 's3:*'
Resource: '*'
Condition:
StringNotEquals:
aws:SourceVpce:
Fn::ImportValue: !Sub '${SolutionNamespace}-S3VPCE'


IAMRoleSageMakerURL:
Type: 'AWS::IAM::Role'
Expand Down

0 comments on commit f2ee757

Please sign in to comment.