Skip to content

Commit

Permalink
pymongo arrow bucket
Browse files Browse the repository at this point in the history
  • Loading branch information
mmeigs committed Mar 20, 2024
1 parent 88e4cf3 commit d8b0902
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
43 changes: 43 additions & 0 deletions infrastructure/ecs-main/buckets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,19 @@ Resources:
IndexDocument: index.html
ErrorDocument: ${self:custom.site.errorDoc.${self:provider.stage}, null}

PymongoArrowBucket:
Type: "AWS::S3::Bucket"
Properties:
PublicAccessBlockConfiguration:
BlockPublicAcls: false
BlockPublicPolicy: false
IgnorePublicAcls: false
RestrictPublicBuckets: false
BucketName: ${self:custom.pymongoArrowBucketName}
WebsiteConfiguration:
IndexDocument: index.html
ErrorDocument: ${self:custom.site.errorDoc.${self:provider.stage}, null}

DocsBucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Expand Down Expand Up @@ -415,3 +428,33 @@ Resources:
Action: 's3:PutObject'
Resource:
- Fn::Join: ['', [{ "Fn::GetAtt": ["CSharpBucket", "Arn" ] }, '/*']]

PymongoArrowBucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket:
Ref: PymongoArrowBucket
PolicyDocument:
Statement:
- Sid: PublicReadGetObject
Effect: Allow
Principal: "*"
Action:
- s3:GetObject
Resource:
- Fn::Join: ['', [{ "Fn::GetAtt": ["PymongoArrowBucket", "Arn" ] }, '/*']]
- Effect: Allow
Principal:
AWS: arn:aws:iam::${aws:accountId}:role/docs-archive-job-${self:provider.stage}-batch
Action:
- 's3:GetObject'
- 's3:ListBucket'
Resource:
- Fn::Join: ['', [{ "Fn::GetAtt": ["PymongoArrowBucket", "Arn" ] }, '/*']]
- Fn::Join: ['', [{ "Fn::GetAtt": ["PymongoArrowBucket", "Arn" ] }]]
- Effect: Allow
Principal:
AWS: arn:aws:iam::${aws:accountId}:role/docs-deploy-job-${self:provider.stage}-batch
Action: 's3:PutObject'
Resource:
- Fn::Join: ['', [{ "Fn::GetAtt": ["PymongoArrowBucket", "Arn" ] }, '/*']]
2 changes: 2 additions & 0 deletions infrastructure/ecs-main/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ custom:
javaIntgrBucketName: docs-java-intgr
nodeBucketName: docs-node-${self:provider.stage}
nodeIntgrBucketName: docs-node-intgr
pymongoArrowBucketName: docs-pymongo-arrow-${self:provider.stage}
pymongoArrowIntgrBucketName: docs-pymongo-arrow-intgr
jobCollection: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/collections/job/queue}
repoBranchesCollection: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/collections/repo}
docsetsCollection: ${ssm:/env/${self:provider.stage}/docs/worker_pool/atlas/collections/docsets}
Expand Down

0 comments on commit d8b0902

Please sign in to comment.