Skip to content

Commit bee85de

Browse files
committed
fix example and tests
1 parent a61deae commit bee85de

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

.config/nextest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ store-failure-output = true
113113
test-threads = 1
114114

115115
[profile.ci]
116-
inherits = "test"
116+
# inherits = "test"
117117
# Print out output for failing tests as soon as they fail, and also at the end
118118
# of the run (for easy scrollability).
119119
failure-output = "immediate-final"

examples/fastapi-response-streaming-lmi/app/main.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
import asyncio
44
import uuid
55

6-
logging.basicConfig(level=logging.INFO)
7-
logger = logging.getLogger(__name__)
8-
96
app = FastAPI()
107

118
@app.get("/health")
@@ -21,8 +18,8 @@ async def streamer(request_id: str):
2118
await asyncio.sleep(0.05)
2219

2320

24-
@app.get("/{path:path}")
25-
async def index(path: str, request: Request):
21+
@app.get("/")
22+
async def index():
2623
"""Stream response - each concurrent request gets a unique ID."""
2724
request_id = str(uuid.uuid4())[:8]
2825
return StreamingResponse(streamer(request_id), media_type="text/plain")

examples/fastapi-response-streaming-lmi/template.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@ Resources:
4040
AWS_LWA_INVOKE_MODE: response_stream
4141
PORT: 8000
4242
Layers:
43-
# - !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:25
44-
- arn:aws:lambda:us-west-2:048972532408:layer:LambdaAdapterLayerX86:8
43+
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:26
4544
CapacityProviderConfig:
4645
Arn: !GetAtt LMICapacityProvider.Arn
4746
PerExecutionEnvironmentMaxConcurrency: 64
4847
FunctionUrlConfig:
49-
AuthType: AWS_IAM
48+
AuthType: NONE
5049
InvokeMode: RESPONSE_STREAM
5150

5251
Outputs:

0 commit comments

Comments
 (0)