generated from amazon-archives/__template_Apache-2.0
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 80
Closed
Description
For the deployed python3.8 runtime on AWS today, the following Lambda is valid:
Handler: src/hello_world.app.lambda_handler
Tree as displayed in Lambda console:
py38test/
  src/
    hello_world/
        __init__.py
        app.py
app.py:
import os
import json
def lambda_handler(event, context):
    # TODO implement
    return {
        'statusCode': 200,
        'body': os.getenv('_HANDLER')
    }
Execution result:
Response
{
  "statusCode": 200,
  "body": "src/hello_world.app.lambda_handler"
}
Function Logs
START RequestId: 1518390e-9e46-43e2-a094-87eac6a55448 Version: $LATEST
END RequestId: 1518390e-9e46-43e2-a094-87eac6a55448
REPORT RequestId: 1518390e-9e46-43e2-a094-87eac6a55448	Duration: 1.01 ms	Billed Duration: 2 ms	Memory Size: 128 MB	Max Memory Used: 51 MB	Init Duration: 118.78 ms
However, a local container with the latest awslambdaric fails to run the same lambda:
{"errorMessage": "Unable to import module 'src/hello_world.app': No module named 'src/hello_world'", "errorType": "Runtime.ImportModuleError", "requestId": "33685819-deae-4fb0-aae1-97c81f7aa9e4", "stackTrace": []}
This change in behavior appears to be introduced by 620b148. Is this intended behavior? Since the handler above works on Lambda today, this appears to be customer-breaking.
Metadata
Metadata
Assignees
Labels
No labels