generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathlambda-ecs-durable-python-sam.json
More file actions
87 lines (87 loc) · 3.27 KB
/
lambda-ecs-durable-python-sam.json
File metadata and controls
87 lines (87 loc) · 3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{
"title": "AWS Lambda durable functions to Amazon ECS with Python",
"description": "Invoke ECS tasks from Lambda durable functions with automatic checkpointing, state management, and resilient execution patterns",
"language": "Python",
"level": "300",
"framework": "AWS SAM",
"introBox": {
"headline": "How it works",
"text": [
"This pattern demonstrates AWS Lambda durable functions invoking Amazon ECS tasks with resilient, long-running execution capabilities:",
"1. Durable Synchronous Pattern: Lambda uses checkpointed steps and durable waits to poll ECS task status. Can run for up to 1 year with automatic recovery from failures. No compute charges during wait periods.",
"2. Durable Callback Pattern: Lambda uses checkpointed steps to reliably initiate ECS tasks. Each step (create record, start task, update status) is automatically checkpointed for guaranteed execution.",
"The pattern uses the AWS Durable Execution SDK for Python, providing automatic state management, checkpoint-based recovery, and cost-effective long-running workflows. Includes inline Python code in ECS containers, and VPC networking,"
]
},
"gitHub": {
"template": {
"repoURL": "https://github.com/aws-samples/serverless-patterns/tree/main/lambda-ecs-durable-python-sam",
"templateURL": "serverless-patterns/lambda-ecs-durable-python-sam",
"projectFolder": "lambda-ecs-durable-python-sam",
"templateFile": "template.yaml"
}
},
"resources": {
"bullets": [
{
"text": "Lambda durable functions",
"link": "https://docs.aws.amazon.com/lambda/latest/dg/durable-functions.html"
},
{
"text": "Durable Execution SDK",
"link": "https://docs.aws.amazon.com/lambda/latest/dg/durable-execution-sdk.html"
},
{
"text": "Run Amazon ECS or Fargate tasks",
"link": "https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_run_task.html"
},
{
"text": "Amazon ECS Task Definitions",
"link": "https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html"
}
]
},
"deploy": {
"text": [
"sam build",
"sam deploy --guided"
]
},
"testing": {
"text": [
"See the GitHub repo for detailed testing instructions."
]
},
"cleanup": {
"text": [
"Delete the stack: <code>sam delete</code>"
]
},
"authors": [
{
"name": "Mian Tariq",
"image": "",
"bio": "Senior Delivery Consultant",
"linkedin": "mian-tariq"
}
],
"patternArch": {
"icon1": {
"x": 20,
"y": 50,
"service": "lambda",
"label": "AWS Lambda durable function"
},
"icon2": {
"x": 80,
"y": 50,
"service": "ecs",
"label": "Amazon ECS"
},
"line1": {
"from": "icon1",
"to": "icon2",
"label": "Sync or Callback"
}
}
}