Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

Fix Image Service access logs #86

Merged
merged 1 commit into from
Aug 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions deploy/cloudformation/app-infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,19 @@ Resources:
ExpirationInDays: 3653
NoncurrentVersionExpirationInDays: 1

LogBucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket: !Ref LogBucket
PolicyDocument:
Statement:
# Allow ALB access logs
- Action: 's3:PutObject'
Effect: 'Allow'
Resource: !Sub 'arn:aws:s3:::${LogBucket}/web/*/AWSLogs/${AWS::AccountId}/*'
Principal:
AWS: '127311923021' # us-east-1 ELB AccountId https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html#access-logging-bucket-permissions

SharedLogGroup:
Type: AWS::Logs::LogGroup
Properties:
Expand Down
2 changes: 1 addition & 1 deletion deploy/cloudformation/iiif-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ Resources:
- ResolvedDomainName:
Fn::ImportValue: !Sub '${DomainStackName}:DomainName'
- Key: idle_timeout.timeout_seconds
Value: '30'
Value: '300'
SecurityGroups:
-
Fn::ImportValue: !Join [':', [!Ref InfrastructureStackName, 'PublicLoadBalancerSecurityGroup']]
Expand Down