Slide 78
Slide 78 text
EFFECTIVELY RUNNING JAVA APPLICATIONS ON AWS – DEEP DIVE
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Functions are invoked by events
• AWS Lambda is invoked via events (API Event, S3 Object Event,
SQS Event ..)
• Events follow a certain structure
• This is different from accepting a HTTP connection
Amazon API Gateway
AWS Lambda
POST /v1/pets HTTP/2
Host: x.execute-api.eu-west-1..
User-Agent: curl/7.64.1
Accept: */*
Content-Type: application/json
Content-Length: 39
Body: {“data:“ : “test“}
{
"body": “{“data“: “test“}“ ,
"resource": "/{proxy+}",
"path": "/path/to/resource",
"httpMethod": "POST",
"isBase64Encoded": true,
"headers": {
"Accept-Encoding": "gzip",
"Accept-Language": "en-US,en;q=0.8"
},
},
"requestContext": {
"accountId": "123456789012",
"requestId": "c6af9ac6-7b61-..",
...
}
}