Skip to content

Commit 487ba2c

Browse files
authored
Merge pull request #3122 from kakakakakku/sfn-sqs-cdk
sfn-sqs-cdk: Update aws-cdk-lib
2 parents 8259153 + fe69aa8 commit 487ba2c

2 files changed

Lines changed: 9 additions & 13 deletions

File tree

sfn-sqs-cdk/README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
21
# Create an AWS Step Functions workflow to integrate with Amazon SQS using CDK.
32

4-
5-
6-
This CDK application deploys a Step Functions workflow, that takes in a payload and sends part of it to an Amazon SQS. In this pattern, the state machine does not wait for a callback from the queue. The application contains the minimum IAM resources required to run the workflow.
3+
This CDK application deploys a AWS Step Functions workflow, that takes in a payload and sends part of it to an Amazon SQS. In this pattern, the state machine does not wait for a callback from the queue. The application contains the minimum IAM resources required to run the workflow.
74
You can find the SAM template for the same pattern [here](https://serverlessland.com/patterns/sfn-sqs)
85

96
To manually create a virtualenv on MacOS and Linux:
@@ -43,7 +40,6 @@ Deploy your code
4340
$ cdk deploy
4441
```
4542

46-
4743
## How it works
4844

4945
* Start the Step Function execution with the sample event payload
@@ -52,10 +48,10 @@ $ cdk deploy
5248

5349
## Testing
5450

55-
Run the following AWS CLI command to send a 'start-execution` command to start the Step Functions workflow. Note, you must edit the {StateMachineExpressSynctoLambda} placeholder with the ARN of the deployed Step Functions workflow. This is provided in the stack outputs.
51+
Run the following AWS CLI command to send a 'start-execution` command to start the AWS Step Functions workflow. Note, you must edit the {StateMachineExpressSynctoLambda} placeholder with the ARN of the deployed AWS Step Functions workflow. This is provided in the stack outputs.
5652

5753
```bash
58-
aws stepfunctions start-execution --name "test" --state-machine-arn "{StateMachineArn}" --input "{\"message\": {\"hello\" : \"world\" } }"
54+
aws stepfunctions start-execution --name "test" --state-machine-arn "{StateMachineArn}" --input "{\"message\": {\"hello\" : \"world\" } }"
5955
```
6056

6157
### output:
@@ -67,10 +63,10 @@ aws stepfunctions start-execution --name "test" --state-machine-arn "{StateMach
6763
}
6864
```
6965

70-
Note the `executionArn` from the above output and run the below cli command to get the status of the execution
66+
Note the `executionArn` from the above output and run the below cli command to get the status of the execution
7167

7268
```bash
73-
aws stepfunctions describe-execution --execution-arn "{executionArn}"
69+
aws stepfunctions describe-execution --execution-arn "{executionArn}"
7470
```
7571

7672
### Get execution status output:
@@ -93,10 +89,10 @@ aws stepfunctions describe-execution --execution-arn "{executionArn}"
9389
}
9490
}
9591
```
96-
Once the `status` is `SUCCEEDED`, we can verify if the message got delivered to the SQS or not by running the below command
92+
Once the `status` is `SUCCEEDED`, we can verify if the message got delivered to the Amazon SQS or not by running the below command
9793

9894
```bash
99-
aws sqs receive-message --queue-url "{QueueUrl}"
95+
aws sqs receive-message --queue-url "{QueueUrl}"
10096
```
10197

10298
### Queue Message output:
@@ -120,7 +116,7 @@ aws sqs receive-message --queue-url "{QueueUrl}"
120116
```bash
121117
cdk destroy
122118
```
123-
119+
124120
## Useful commands
125121

126122
* `cdk ls` list all stacks in the app

sfn-sqs-cdk/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
aws-cdk-lib==2.13.0
1+
aws-cdk-lib==2.257.0
22
constructs>=10.0.0,<11.0.0

0 commit comments

Comments
 (0)