Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable versioning and server access logging for ArtifactBucket #396

Merged
merged 1 commit into from
Mar 13, 2020
Merged
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
27 changes: 24 additions & 3 deletions src/rpdk/core/data/managed-upload-infrastructure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@ Resources:
Status: Enabled
AbortIncompleteMultipartUpload:
DaysAfterInitiation: 1
VersioningConfiguration:
Status: Enabled
LoggingConfiguration:
DestinationBucketName: !Ref AccessLogsBucket
LogFilePrefix: ArtifactBucket

AccessLogsBucket:
Type: AWS::S3::Bucket
Properties:
AccessControl: LogDeliveryWrite
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
SSEAlgorithm: aws:kms
KMSMasterKeyID: !Ref EncryptionKey
LifecycleConfiguration:
Rules:
- Status: Enabled
ExpirationInDays: 3653
VersioningConfiguration:
Status: Enabled

ArtifactCopyPolicy:
Type: AWS::S3::BucketPolicy
Expand Down Expand Up @@ -55,7 +76,7 @@ Resources:
Description: KMS key used to encrypt the resource type artifacts
EnableKeyRotation: true
KeyPolicy:
Version: 2012-10-17
Version: "2012-10-17"
Statement:
- Sid: Enable full access for owning account
Effect: Allow
Expand All @@ -80,7 +101,7 @@ Resources:
Properties:
MaxSessionDuration: 43200
AssumeRolePolicyDocument:
Version: '2012-10-17'
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Expand All @@ -92,7 +113,7 @@ Resources:
Policies:
- PolicyName: LogAndMetricsDeliveryRolePolicy
PolicyDocument:
Version: '2012-10-17'
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
Expand Down