Query
, Scan
, PutItem
, UpdateItem
) the same way that it does execute Lambda functions. However this requires some integration work to ensure that the request and response both get translated from an HTTP to a DynamoDB world and reverse./insurers
, /insurers/active
, /insurers/{id}
)GET /insurers
, POST /insurers
)application/json
content of an HTTP request into a DynamoDB-readable command by means of a Mapping Templatestatus 200
responseTangleJinx
)default
in our case)eu-central-1
POST
, regardless of the API action. This is because all requests to DynamoDB actually require POST
to executeScan
, Query
, PutItem
, GetItem
, UpdateItem
etc (any valid DynamoDB command)arn:aws:iam::ACCOUNT_ID:role/lambda_full_access role
(we've set it up so that it can accept API Gateway as a Trusted Entity)invoke url
by which the API can be called.success-message-data
pattern like in all other APIs.$context.requestId
variable, which is very handy for creating new objects' uuid.S
stands for String, N
for Number, L
for List, B
for Boolean, and M
for Map.POST
ing to DynamoDB, you need to use UpdateItem
with the RETURN_ALL
attribute. Using PutItem
will prevent any item from being returned.Scan
action.M
field (i.e., the Map) to get the subfields, as shown in the example below.uuid
- GetItem
action/{uuid}
API resource.Scan
actionparam1=foo¶m2=bar
UpdateItem
actionrequestId
from the context, as outlined above.ALL_NEW
as ReturnValues
in order to receive the full updated object in the integration response.ExpressionAttributeNames
is used to replace variable names which are reserved keywords from AWS with another one that are not.UpdateItem
actionALL_NEW
as ReturnValues
in order to receive the full updated object in the integration response.