File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 91
91
)
92
92
93
93
# Create a Lambda function using the Docker image
94
- lambda_function = aws .lambda_ .Function (f"my-serverless-function-{ environment } " ,
94
+ lambda_function = aws .lambda_ .Function (
95
+ f"my-serverless-function-{ environment } " ,
95
96
name = f"my-serverless-function-{ environment } " ,
96
- role = lambda_role .arn , # Make sure you have the correct IAM role
97
- package_type = "Image" , # Specify that this is a Docker image
98
- image_uri = docker_image , # Use the image name from the previous step
99
- memory_size = 512 , # Example memory size
100
- timeout = 30 # Example timeout in seconds
97
+ role = lambda_role .arn ,
98
+ package_type = "Image" ,
99
+ image_uri = docker_image ,
100
+ memory_size = 512 ,
101
+ timeout = 30 ,
102
+ opts = pulumi .ResourceOptions (depends_on = [lambda_role ])
101
103
)
102
104
103
105
# Create an API Gateway REST API
Original file line number Diff line number Diff line change @@ -103,6 +103,8 @@ async def delete_todo(id: str):
103
103
@app .get ("/health" )
104
104
async def health ():
105
105
try :
106
+ logging .debug ("Health check initiated" )
107
+ # Simple check to see if everything is working
106
108
return {"message" : "Everything looks good!" }
107
109
except Exception as e :
108
110
logging .error (f"Health check error: { e } " )
You can’t perform that action at this time.
0 commit comments