Skip to content

Commit

Permalink
feat: Shortened s3 report name
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewDorn committed Oct 12, 2022
1 parent 15e5868 commit 892642c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ and includes an additional section for migration notes.

## [Unreleased]

## [6.0.1]
### Changed
- *ORCA-566* Shortened S3 inventory report name due to length limitation causing errors when a user's naming schema is long.

## [6.0.0]
### Changed
- *ORCA-290* Renamed `excludeFileTypes`, `orcaDefaultBucketOverride` and `orcaDefaultStorageClassOverride` to `excludedFileExtensions`, `defaultBucketOverride` and `defaultStorageClassOverride` respectively. In addition, ORCA configuration variables `excludedFileExtensions`, `defaultBucketOverride` and `defaultStorageClassOverride` are now under `collection.meta.orca`.
Expand Down
2 changes: 1 addition & 1 deletion modules/lambdas_secondary/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ resource "aws_s3_bucket_inventory" "inventory-report" {
for_each = toset(local.orca_bucket_names)

bucket = each.key
name = "${var.prefix}-${each.key}-inventory-report"
name = "${each.key}-inventory"

included_object_versions = "All"
optional_fields = ["Size", "LastModifiedDate", "StorageClass", "ETag"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ aws s3api create-bucket \
--create-bucket-configuration "LocationConstraint=us-west-2"
```

- **\[orca bucket name\]** - This is the name of your bucket. Example: `sandbox-orca-glacier-archive` and `sandbox-orca-reports`
- **\[orca bucket name\]** - This is the name of your bucket. Example: `PREFIX-orca-archive` and `PREFIX-orca-reports`
- **\[AWS OU profile\]** - This is the AWS profile name to use to connect to the proper OU where the bucket will be created.

:::note
Expand Down Expand Up @@ -122,8 +122,8 @@ an example of a justification.
This is the name of the ORCA archive bucket created in the Disaster Recover OU.
Below is an example name of an ORCA archive bucket and ORCA report bucket.

> sandbox-orca-glacier-archive
> sandbox-orca-reports
> PREFIX-orca-archive
> PREFIX-orca-reports
#### Policy:

Expand Down Expand Up @@ -156,8 +156,8 @@ modifications, which will be detailed below.
"s3:ListBucketVersions"
],
"Resource":[
"arn:aws:s3:::sandbox-orca-glacier-archive",
"arn:aws:s3:::sandbox-orca-glacier-archive/*"
"arn:aws:s3:::PREFIX-orca-archive",
"arn:aws:s3:::PREFIX-orca-archive/*"
]
},
{
Expand All @@ -168,7 +168,7 @@ modifications, which will be detailed below.
},
"Action":"s3:PutObject*",
"Resource":[
"arn:aws:s3:::sandbox-orca-glacier-archive/*"
"arn:aws:s3:::PREFIX-orca-archive/*"
],
"Condition":{
"StringEquals":{
Expand Down Expand Up @@ -204,7 +204,7 @@ aws sts get-caller-identity
Replace the number in `arn:aws:iam::012345678912:root` with the value of your account number.

The Resource value is the bucket and bucket paths that the Cumulus application
can access. Replace `sandbox-orca-glacier-archive` with the name
can access. Replace `PREFIX-orca-archive` with the name
of the Orca archive bucket created in the previous section.

##### Reports Bucket:
Expand All @@ -231,33 +231,33 @@ modifications, which will be detailed below.
"s3:PutBucketNotification"
],
"Resource": [
"arn:aws:s3:::sandbox-orca-glacier-archive",
"arn:aws:s3:::sandbox-orca-glacier-archive/*"
"arn:aws:s3:::PREFIX-orca-reports",
"arn:aws:s3:::PREFIX-orca-reports/*"
]
},
{
"Sid": "Inventory-sandbox-orca-glacier-archive",
"Sid": "Inventory-PREFIX-orca-reports",
"Effect": "Allow",
"Principal": {
"Service": "s3.amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::sandbox-orca-glacier-archive/*",
"Resource": "arn:aws:s3:::PREFIX-orca-reports/*",
"Condition": {
"StringEquals": {
"s3:x-amz-acl": "bucket-owner-full-control",
"aws:SourceAccount": "000000000000"
},
"ArnLike": {
"aws:SourceArn": "arn:aws:s3:::sandbox-orca-glacier-archive"
"aws:SourceArn": "arn:aws:s3:::PREFIX-orca-reports"
}
}
}
]
}
```
The Principal value is the AWS root user for your Cumulus application that will
access the ORCA archive bucket.
access the ORCA reports bucket.
See the Archive Bucket instructions for assistance getting this value.

Replace the number in `arn:aws:iam::012345678912:root` with the value of your account number.
Expand All @@ -266,5 +266,5 @@ See the Archive Bucket instructions for assistance getting this value.
Replace the number `000000000000` with your DR account number.

The Resource value is the bucket and bucket paths that the Cumulus application
can access. Replace `sandbox-orca-glacier-archive` with the name
of the Orca archive bucket created in the previous section.
can access. Replace `PREFIX-orca-reports` with the name
of the Orca reports bucket created in the previous section.

0 comments on commit 892642c

Please sign in to comment.