Closed
Description
Use case
As a user, I want to create a Bedrock Agent using Lambda. I will receive a new payload type specific for this integration, and Bedrock expects my Lambda function to output a certain format.
https://docs.aws.amazon.com/bedrock/latest/userguide/agents-create.html
NOTE: As of October 26, 2023, the payload structure of the Lambda input event and response format is changing.
Current payload
Input
{
"messageVersion": "1.0",
"agent": {
"name": "string",
"id": "string",
"alias": "string",
"version": "string"
},
"inputText": "string",
"sessionId": "string",
"actionGroup": "string",
"apiPath": "string",
"httpMethod": "string",
"parameters": [
{
"name": "string",
"type": "string",
"value": "string"
},
...
],
"requestBody": {
"content": {
"<content_type>": {
"properties": [
{
"name": "string",
"type": "string",
"value": "string"
},
...
]
}
}
},
"sessionAttributes": {
"string": "string",
}
}
Output
{
"messageVersion": "1.0",
"response": {
"actionGroup": "string",
"apiPath": "string",
"httpMethod": "string",
"httpStatusCode": number,
"responseBody": {
"<contentType>": {
"body": "string"
}
}
}
}
Solution/User Experience
Add event source data class and parser support for the input and output events.
Alternative solutions
No response
Acknowledgment
- This feature request meets Powertools for AWS Lambda (Python) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Java, TypeScript, and .NET
Metadata
Metadata
Assignees
Type
Projects
Status
Shipped