Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add support for the Bedrock Agent event and response formats #3261

Closed
2 tasks done
rubenfonseca opened this issue Oct 27, 2023 · 2 comments · Fixed by #3262, #3286, #3285 or #3312
Closed
2 tasks done
Assignees
Labels
event_handlers event_sources Event Source Data Class utility feature-request feature request parser Parser (Pydantic) utility

Comments

@rubenfonseca
Copy link
Contributor

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

@rubenfonseca rubenfonseca added triage Pending triage from maintainers feature-request feature request labels Oct 27, 2023
@rubenfonseca rubenfonseca self-assigned this Oct 27, 2023
@rubenfonseca rubenfonseca moved this from Triage to Working on it in Powertools for AWS Lambda (Python) Oct 27, 2023
@rubenfonseca rubenfonseca added event_sources Event Source Data Class utility parser Parser (Pydantic) utility event_handlers and removed triage Pending triage from maintainers labels Oct 27, 2023
@rubenfonseca rubenfonseca linked a pull request Oct 30, 2023 that will close this issue
7 tasks
@github-project-automation github-project-automation bot moved this from Working on it to Coming soon in Powertools for AWS Lambda (Python) Nov 2, 2023
Copy link
Contributor

github-actions bot commented Nov 2, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.

Copy link
Contributor

This is now released under 2.26.1 version!

@github-actions github-actions bot removed the pending-release Fix or implementation already in dev waiting to be released label Nov 10, 2023
@heitorlessa heitorlessa moved this from Coming soon to Shipped in Powertools for AWS Lambda (Python) Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment