Skip to content

Commit 3ab4d2b

Browse files
add artifact s3 bucket
1 parent 3e8d68e commit 3ab4d2b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

cfn/ESDK-Python.yml

+27
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ Resources:
175175
- !Ref CodeBuildBasePolicy
176176
- !Ref SecretsManagerPolicy
177177
- !Ref CodeBuildCISTSAllow
178+
- !Ref GeneratedVectorsArtifactsS3BucketPolicy
178179

179180
CodeBuildCIServiceRole:
180181
Type: "AWS::IAM::Role"
@@ -189,6 +190,7 @@ Resources:
189190
- !Ref CodeBuildBasePolicy
190191
- !Ref SecretsManagerCIPolicy
191192
- !Ref CodeBuildCISTSAllow
193+
- !Ref GeneratedVectorsArtifactsS3BucketPolicy
192194

193195
CodeBuildBatchPolicy:
194196
Type: "AWS::IAM::ManagedPolicy"
@@ -379,3 +381,28 @@ Resources:
379381
}
380382
]
381383
}
384+
385+
GeneratedVectorsArtifactsS3Bucket:
386+
Type: 'AWS::S3::Bucket'
387+
Properties:
388+
BucketName: generated-vectors-artifacts-bucket
389+
LifecycleConfiguration:
390+
Rules:
391+
- Id: Expire artifacts in 14 days
392+
Status: Enabled
393+
ExpirationInDays: 14
394+
395+
GeneratedVectorsArtifactsS3BucketPolicy:
396+
Type: 'AWS::IAM::ManagedPolicy'
397+
Properties:
398+
ManagedPolicyName: Generated-Vectors-Artifacts-S3-Bucket-Policy
399+
PolicyDocument:
400+
Version: 2012-10-17
401+
Statement:
402+
- Effect: Allow
403+
Action:
404+
- 's3:PutObject'
405+
- 's3:GetObject'
406+
- 's3:DeleteObject'
407+
Resource:
408+
- !Join [ "", [ !GetAtt GeneratedVectorsArtifactsS3Bucket.Arn, '/*'] ]

0 commit comments

Comments
 (0)