Skip to content

Commit 8fed3b7

Browse files
authored
Merge pull request #3 from aws-samples/s3-improvements
S3 improvements
2 parents f304652 + b1fccda commit 8fed3b7

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ The demo application is deployed as an [AWS CloudFormation](https://aws.amazon.c
7777
#### Accessing the Application
7878

7979
After deployment, the application can be used by configuring the following services.
80-
1. The event that triggers the Step Machine is defaulted to run every hour and is set to "Enabled" at the start. This event can be modified and set to "Disabled" if the use case does not need to trigger the step machine automatically. The default hourly run schedule can also be modified as per use case. When modifying the run schedule, a key point to bear in mind will be to check the pricing for Amazon Rekognition Custom Labels - which is currently priced per hour. The step machine is configured to shut down the model after 1 hour by default.
81-
2. The Source S3 bucket should be used as the destination bucket for all the images to be used for inferencing.
80+
1. The event that triggers the Step Machine is defaulted to run every 2 hours and is set to "Enabled" at the start. This event can be modified and set to "Disabled" if the use case does not need to trigger the step machine automatically. The default 2 hours run schedule can also be modified as per use case. When modifying the run schedule, a key point to bear in mind will be to check the pricing for Amazon Rekognition Custom Labels - which is currently priced per hour. The step machine is configured to shut down the model after 1 hour by default.
81+
2. The Source S3 bucket should be used as the destination bucket for all the images to be used for inferencing. As the images get processed, they will be deleted from the source bucket.
8282
3. The Final S3 bucket holds the images that have been processed along with the inferenced custom label jsons.
8383

8484

8585
### Remove the application
8686

87-
To remove the application open the AWS CloudFormation Console, click on the name of the project, right-click and select "_Delete Stack_". Your stack will take some time to be deleted. You can track its progress in the "Events" tab. When it is done, the status will change from "_DELETE_IN_PROGRESS_" to "_DELETE_COMPLETE_". It will then disappear from the list. Please note that the Amazon S3 buckets will only be deleted if they are empty.
87+
To remove the application open the AWS CloudFormation Console, click on the name of the project, right-click and select "_Delete Stack_". Your stack will take some time to be deleted. You can track its progress in the "Events" tab. When it is done, the status will change from "_DELETE_IN_PROGRESS_" to "_DELETE_COMPLETE_". It will then disappear from the list. Please note that the Amazon S3 buckets and their content will be retained.
8888

8989

9090
## License

template.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ Parameters:
1212
Mappings:
1313
Solution:
1414
Constants:
15-
Version: 'v0.5'
15+
Version: 'v0.6'
1616

1717
Resources:
1818
SourceS3Bucket:
1919
Type: AWS::S3::Bucket
20+
DeletionPolicy: Retain
2021
Properties:
22+
BucketEncryption:
23+
ServerSideEncryptionConfiguration:
24+
- ServerSideEncryptionByDefault:
25+
SSEAlgorithm: AES256
2126
NotificationConfiguration:
2227
QueueConfigurations:
2328
- Event: s3:ObjectCreated:*
@@ -127,7 +132,7 @@ Resources:
127132
Properties:
128133
Description: Schedule to run the state machine every hour
129134
Enabled: True # This schedule can be disabled based on the use case to avoid incurring charges.
130-
Schedule: "rate(1 hour)"
135+
Schedule: "rate(2 hours)"
131136
Policies: # Find out more about SAM policy templates: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-policy-templates.html
132137
- LambdaInvokePolicy:
133138
FunctionName: !Ref SQSPollerFunction
@@ -230,6 +235,12 @@ Resources:
230235

231236
FinalS3Bucket:
232237
Type: "AWS::S3::Bucket"
238+
DeletionPolicy: Retain
239+
Properties:
240+
BucketEncryption:
241+
ServerSideEncryptionConfiguration:
242+
- ServerSideEncryptionByDefault:
243+
SSEAlgorithm: AES256
233244

234245
AnalyseImageFunction:
235246
Type: AWS::Serverless::Function # More info about Function Resource: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-function.html

0 commit comments

Comments
 (0)