Skip to content

Commit

Permalink
Add ability to access odl-micromasters-audit bucket to IAM policy
Browse files Browse the repository at this point in the history
  • Loading branch information
feoh committed Mar 8, 2023
1 parent e19b7cb commit 4af511b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ol_infrastructure/applications/micromasters/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@

# Bucket used to store files from MicroMasters app.
micromasters_bucket_name = f"ol-micromasters-app-{stack_info.env_suffix}"
micromasters_audit_bucket_name = f"odl-micromasters-audit-{stack_info.env_suffix}"
micromasters_bucket = s3.Bucket(
f"micromasters-{stack_info.env_suffix}",
bucket=micromasters_bucket_name,
Expand Down Expand Up @@ -90,6 +91,7 @@
},
{
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:ListBucket*",
"s3:PutObject",
Expand All @@ -100,6 +102,8 @@
"Resource": [
f"arn:aws:s3:::{micromasters_bucket_name}",
f"arn:aws:s3:::{micromasters_bucket_name}/*",
f"arn:aws:s3:::{micromasters_audit_bucket_name}",
f"arn:aws:s3:::{micromasters_audit_bucket_name}/*",
],
},
],
Expand Down

0 comments on commit 4af511b

Please sign in to comment.