Skip to content

Commit 44113c9

Browse files
committed
Fix the render
1 parent cf39a38 commit 44113c9

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

api.py renamed to app.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
from flask import Flask
1+
from flask import Flask, render_template
22
app = Flask(__name__)
33

4-
54
@app.route("/")
65
def cats():
7-
return "aws-lambda-python"
6+
return render_template('index.html')
87

98
@app.route("/dogs/<id>")
109
def dog(id):

serverless.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
service: "aws-lambda-python" # <name> of the service
22
provider:
33
name: aws
4-
runtime: python3.8
4+
runtime: python3.9
55
stage: prod
66
region: us-west-2
77
deploymentBucket:
@@ -56,8 +56,9 @@ custom:
5656
region: ${opt:region, self:provider.region}
5757
pythonRequirements:
5858
dockerizePip: true
59+
dockerImage: python:3.9
5960
wsgi:
60-
app: api.app
61+
app: app.app
6162

6263
package:
6364
patterns:

templates/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<html>
2+
<body>
3+
<h1>aws-python-landing</h1>
4+
</body>
5+
</html>

0 commit comments

Comments
 (0)