Skip to content

Commit 27b9006

Browse files
committed
remove Put bucketPermissions
1 parent 07e4322 commit 27b9006

File tree

5 files changed

+296
-44
lines changed

5 files changed

+296
-44
lines changed

source/patterns/@aws-solutions-constructs/aws-fargate-s3/README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,6 @@ const props: FargateToS3Props = {
3737
new FargateToS3(stack, 'test-construct', props);
3838
```
3939

40-
## Initializer
41-
42-
``` text
43-
new FargateToS3(scope: Construct, id: string, props: FargateToS3Props);
44-
```
45-
46-
_Parameters_
47-
48-
* scope [`Construct`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_core.Construct.html)
49-
* id `string`
50-
* props [`FargateToS3Props`](#pattern-construct-props)
51-
5240
## Pattern Construct Props
5341

5442
| **Name** | **Type** | **Description** |
@@ -68,7 +56,7 @@ _Parameters_
6856
|bucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.BucketProps.html)|Optional user provided props to override the default props for the S3 Bucket.|
6957
|loggingBucketProps?|[`s3.BucketProps`](https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-s3.BucketProps.html)|Optional user provided props to override the default props for the S3 Logging Bucket.|
7058
|logS3AccessLogs?| boolean|Whether to turn on Access Logging for the S3 bucket. Creates an S3 bucket with associated storage costs for the logs. Enabling Access Logging is a best practice. default - true|
71-
|bucketPermissions?|`string[]`|Optional bucket permissions to grant to the Lambda function. One or more of the following may be specified: `Delete`, `Put`, `Read`, `ReadWrite`, `Write`.|
59+
|bucketPermissions?|`string[]`|Optional bucket permissions to grant to the Fargate service. One or more of the following may be specified: `Delete`, `Read`, and `Write`. Default is `ReadWrite` which includes `[s3:GetObject*, s3:GetBucket*, s3:List*, s3:DeleteObject*, s3:PutObject*, s3:Abort*]`.|
7260
|bucketArnEnvironmentVariableName?|string|Optional Name for the S3 bucket arn environment variable set for the container.|
7361
|bucketEnvironmentVariableName?|string|Optional Name for the S3 bucket name environment variable set for the container.|
7462

source/patterns/@aws-solutions-constructs/aws-fargate-s3/lib/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ export interface FargateToS3Props {
120120
*/
121121
readonly logS3AccessLogs?: boolean;
122122
/**
123-
* Optional bucket permissions to grant to the Lambda function.
123+
* Optional bucket permissions to grant to the Fargate service.
124124
* One or more of the following may be specified: "Delete", "Put", "Read", "ReadWrite", "Write".
125125
*
126-
* @default - Read/write access is given to the Lambda function if no value is specified.
126+
* @default - Read/write access is given to the Fargate service if no value is specified.
127127
*/
128128
readonly bucketPermissions?: string[];
129129
/**
@@ -208,15 +208,9 @@ export class FargateToS3 extends Construct {
208208
if (props.bucketPermissions.includes('Delete')) {
209209
bucket.grantDelete(this.service.taskDefinition.taskRole);
210210
}
211-
if (props.bucketPermissions.includes('Put')) {
212-
bucket.grantPut(this.service.taskDefinition.taskRole);
213-
}
214211
if (props.bucketPermissions.includes('Read')) {
215212
bucket.grantRead(this.service.taskDefinition.taskRole);
216213
}
217-
if (props.bucketPermissions.includes('ReadWrite')) {
218-
bucket.grantReadWrite(this.service.taskDefinition.taskRole);
219-
}
220214
if (props.bucketPermissions.includes('Write')) {
221215
bucket.grantWrite(this.service.taskDefinition.taskRole);
222216
}

0 commit comments

Comments
 (0)