You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 14, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: DevOps/0_CodeStar/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ Once you've chosen a region, you should deploy all of the resources for this wor
83
83
1. Once provisioning is complete, there will be a brief delay as the CodePipeline pipeline executes for the first time. The pipeline consists of three stages:
84
84
85
85
* Source stage: source code is copied from the CodeCommit repository
86
-
* Build stage: a CodeBuild project executes the commands defined in the project's buildspec.yml to compile the source code into a deployable artifact, in this case, a Serverless Application Model (SAM) artifact in this case
86
+
* Build stage: a CodeBuild project executes the commands defined in the project's buildspec.yml to compile the source code into a deployable artifact, in this case a Serverless Application Model (SAM) artifact.
87
87
* Deploy stage: CloudFormation is used to deploy the SAM artifact, representing Lambda functions and an API Gateway environment.
88
88
89
89
When these stages are complete, an API Gateway **Application endpoint** will appear in the dashboard.
Copy file name to clipboardExpand all lines: ImageProcessing/README.md
+33-50Lines changed: 33 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,15 +75,19 @@ The following AWS CloudFormation template will create these resources:
75
75
* **ThumbnailS3Bucket** stores the resized thumbnails of the rider photos
76
76
* One Amazon DynamoDB table **RiderPhotoDDBTable** that stores the metadata of the rider's photo with rider's profile
77
77
* AWS Lambda functions that performs the processing steps
78
+
* IAM role **StateMachineRole** that gives the Step Functions state machine to invoke lambda functions
78
79
79
80
80
81
Click on the link for the region you have chosen:
81
82
82
-
Region| Launch
83
-
------|-----
84
-
US East (N. Virginia) | [](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=wildrydes-step-module-resources&templateURL=https://s3.amazonaws.com/wild-rydes-step-module-us-east-1/0-cfn/wild-rydes-step-module-us-east-1.output.yaml)
85
-
US West (Oregon) | [](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=wildrydes-step-module-resources&templateURL=https://s3-us-west-2.amazonaws.com/wild-rydes-step-module-us-west-2/0-cfn/wild-rydes-step-module-us-west-2.output.yaml)
86
-
EU (Ireland) | [](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=wildrydes-step-module-resources&templateURL=https://s3-eu-west-1.amazonaws.com/wild-rydes-step-module-eu-west-1/0-cfn/wild-rydes-step-module-eu-west-1.output.yaml)
83
+
Region| Code | Launch
84
+
------|------|-------
85
+
US East (Ohio)| <spanstyle="font-family:'Courier';">us-east-2</span> | [](https://console.aws.amazon.com/cloudformation/home?region=us-east-2#/stacks/new?stackName=wildrydes-step-module-resources&templateURL=https://s3-us-east-2.amazonaws.com/wild-rydes-sfn-module-us-east-2/0-cfn/step2-sam.yaml)
86
+
US East (N. Virginia) | <spanstyle="font-family:'Courier';">us-east-1</span> | [](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/new?stackName=wildrydes-step-module-resources&templateURL=https://s3.amazonaws.com/wild-rydes-sfn-module-us-east-1/0-cfn/step2-sam.yaml)
87
+
US West (Oregon) | <spanstyle="font-family:'Courier';">us-west-2</span> | [](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=wildrydes-step-module-resources&templateURL=https://s3-us-west-2.amazonaws.com/wild-rydes-sfn-module-us-west-2/0-cfn/step2-sam.yaml)
88
+
EU (Ireland) | <spanstyle="font-family:'Courier';">eu-west-1</span> | [](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/new?stackName=wildrydes-step-module-resources&templateURL=https://s3-eu-west-1.amazonaws.com/wild-rydes-sfn-module-eu-west-1/0-cfn/step2-sam.yaml)
89
+
Tokyo | <spanstyle="font-family:'Courier';">ap-northeast-1</span> | [](https://console.aws.amazon.com/cloudformation/home?region=ap-northeast-1#/stacks/new?stackName=wildrydes-step-module-resources&templateURL=https://s3-ap-northeast-1.amazonaws.com/wild-rydes-sfn-module-ap-northeast-1/0-cfn/step2-sam.yaml)
90
+
Sydney | <spanstyle="font-family:'Courier';">ap-southeast-2</span> | [](https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/new?stackName=wildrydes-step-module-resources&templateURL=https://s3-ap-southeast-2.amazonaws.com/wild-rydes-sfn-module-ap-southeast-2/0-cfn/step2-sam.yaml)
87
91
88
92
<details>
89
93
<summary><strong>AWS CloudFormation Launch Instructions (expand for details)</strong></summary><p>
@@ -108,6 +112,8 @@ EU (Ireland) | [ To verify the IAM role's full name, you can open a new tab for the CloudFormation console and check the **Output** section of the stack you just created, and look for `StateMachineRole`.
194
+
195
+

196
+
183
197
184
198
1. Paste in the JSON from your `rider-photo-state-machine.json` file into the **Code** editor portion.
185
199
186
200
1. You can click on the ↺ sign next to **Preview** to visualize the workflow:
187
201
188
-

202
+

189
203
190
204
191
205
1. Click **Create State Machine** to create the state machine.
192
206
193
-
1. In the pop-up window, select the IAM role automatically generated for you (the name should look like `StatesExecutionRole-{region-name}`).
194
-
195
-

196
-
197
207
1. Click the **New execution** button to start a new execution.
198
208
199
209
1. Here you specify the input data passed into the AWS Step Functions state machine to process.
@@ -330,11 +340,14 @@ If the uploaded photo has passed the basic face detection checks, the next step
330
340
```
331
341
</p></details>
332
342
333
-
1. Go back the AWS Step Functions Console, create a new state machine `RiderPhotoProcessing-2` by copy-pasting the updated JSON definition:
343
+
1. Go back the AWS Step Functions Console, select the `RiderPhotoProcessing` state machine and click the **Edit state machine** button
344
+
345
+

346
+
347
+
1. Copy-paste the updated JSON definition into the editor, then click **Update and start execution**
334
348
335
-

349
+

336
350
337
-
> **Note**: AWS Step Functions state machines are immutable. Therefore, every time you want to change the state machine definition, you must always create a new state machine.
338
351
339
352
1. Test the new state machine with the test input you've used before:
340
353
@@ -347,7 +360,6 @@ If the uploaded photo has passed the basic face detection checks, the next step
347
360
```
348
361
Because we haven't added the step yet to index the face in the photo into the Rekognition collection, the `CheckFaceDuplicate` step will always succeed at this point.
349
362
350
-
351
363
</p></details>
352
364
353
365
### 5. Add parallel processing step
@@ -490,11 +502,10 @@ The ARNs of the two AWS Lambda functions that performs face index and generate t
490
502
```
491
503
</p></details>
492
504
493
-
1. Go back the AWS Step Functions Console, create a new state machine `RiderPhotoProcessing-3` by copy-pasting the updated JSON definition:
505
+
1. Go back the AWS Step Functions Console, update the `RiderPhotoProcessing` statemachine by copy-pasting the updated JSON definition:
494
506
495
-

507
+

496
508
497
-
> **Note**: AWS Step Functions state machines are immutable. Therefore, every time you want to change the state machine definition, you must always create a new state machine.
498
509
499
510
1. Test the new state machine with the test input you've used before:
500
511
@@ -654,9 +665,10 @@ The ARN of the AWS Lambda function that persists the metadata can be found in th
654
665
```
655
666
</p></details>
656
667
657
-
1. Go back the AWS Step Functions Console, create a new state machine`RiderPhotoProcessing-4` by copy-pasting the updated JSON definition:
668
+
1. Go back the AWS Step Functions Console, update the state machine by copy-pasting the updated JSON definition:
658
669
659
-

670
+

671
+
660
672
661
673
1. Test the new state machine with test input:
662
674
@@ -725,36 +737,7 @@ The intent of the **PhotoDoesNotMeetRequirement** step is to send notification
725
737
726
738
## Clean-up
727
739
728
-
1. Delete the `RiderPhotoProcessing-*` state machines from the AWS Step Functions console.
729
-
730
-
<details>
731
-
<summary><strong>Step-by-step instructions (expand for details)</strong></summary><p>
732
-
733
-
In the AWS Step Functions Management Console, go to **Dashboard**, select the state machine to delete, then click **Delete**.
734
-
735
-

736
-
737
-
</p></details>
738
-
739
-
1. Empty the Amazon S3 buckets used to store rider images and thumbnails.
740
-
741
-
<details>
742
-
<summary><strong>Step-by-step instructions (expand for details)</strong></summary><p>
743
-
744
-
1. In the Amazon S3 Management Console, click on the  icon next to Amazon S3 bucket used to store rider photos (The S3 bucket should have a name similar to `wildrydes-step-module-resource-riderphotos3bucket-7l698ggkdcf3`).
1. Repeat the steps to empty the Amazon S3 bucket used to store photo thumbnails (it should have a name similar to `wildrydes-step-module-resources-thumbnails3bucket-1j0t3m28k7mxo`).
756
-
757
-
</p></details>
740
+
1. Delete the `RiderPhotoProcessing` state machine from the AWS Step Functions console.
758
741
759
742
1. Delete the `wildrydes-step-module-resources` AWS CloudFormation stack that launched the AWS Lambda functions, Amazon S3 buckets and Amazon DynamoDB table.
0 commit comments