Skip to content

Commit

Permalink
Fixing policies, cloudfront true as default
Browse files Browse the repository at this point in the history
  • Loading branch information
matteofigus committed May 29, 2020
1 parent 2b46a06 commit eac7568
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/cfn/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Globals:
MIN_CONFIDENCE: !Ref MinConfidence
OBJECTS_OF_INTEREST_LABELS: !Join [",", !Ref ObjectsOfInterestLabels]
REGION: !Ref AWS::Region
VERSION: '0.3'
VERSION: '0.4'
Api:
EndpointConfiguration: REGIONAL
Cors:
Expand Down Expand Up @@ -78,7 +78,7 @@ Parameters:
CreateCloudFrontDistribution:
Description: Creates a CloudFront distribution for accessing the web interface of the demo. This must be enabled if S3 Block Public Access is enabled at an account level.
Type: String
Default: "false"
Default: "true"
AllowedValues:
- "true"
- "false"
Expand Down Expand Up @@ -248,23 +248,24 @@ Resources:
Description: Custom Lambda resource for the Virtual Proctor Cloudformation Stack
Environment:
Variables:
COLLECTION_ID: !Ref ResourcePrefix
API_GATEWAY: !Sub https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/
COGNITO_IDENTITY_POOL: !Ref CognitoIdentityPool
COGNITO_USERPOOL_ID: !Ref CognitoUserPool
COGNITO_USERPOOLCLIENT_ID: !Ref CognitoUserPoolClient
FROM_BUCKET: !Sub solution-builders-${AWS::Region}
COLLECTION_ID: !Ref ResourcePrefix
CREATE_CLOUDFRONT_DISTRIBUTION: !Ref CreateCloudFrontDistribution
FROM_BUCKET: !Sub solution-builders-${AWS::Region}
REGION: !Ref AWS::Region
TO_BUCKET: !Ref WebUIBucket
Timeout: 900
Policies:
- Statement:
- Effect: Allow
Action:
- s3:PutObject*
- s3:DeleteObject*
- s3:ListBucket*
- s3:ListObject*
- s3:PutObject
- s3:PutObjectAcl
- s3:DeleteObject
- s3:ListBucket
Resource:
- !Sub arn:aws:s3:::${WebUIBucket}
- !Sub arn:aws:s3:::${WebUIBucket}/*
Expand Down

0 comments on commit eac7568

Please sign in to comment.