The screen recording export to S3 is failing. EventBridge rule is firing on interaction.screen.recording.created, routing to a Lambda Data Action - simple PUT object request. Lambda logs show a 400 Bad Request from the Genesys Cloud API - /api/v2/recordings/{recordingId}/exports. Doesn’t seem like an S3 permissions issue.
We’re using the latest SDK - the one that supports the new header format. Thought it was a payload issue but the Lambda’s doing jack all except copying the event data. Something in the Admin UI must be overriding the request.
That fix worked - the recording ID was lowercase in the event, uppercase in the API call. Should’ve seen that. We’re updating the Lambda to force case consistency - it’s a mess.
sorry to jump in, but just a little thing i notice… we have the same problem here in .au, mypurecloud.com.au. the casing is big issue, yes, like the reply before. but also, the date format is very important. i think?
we have the compliance team, they pull the recording for ACMA, and the api is very picky about the date. i am still learning, sorry. the event payload usually comes in UTC but the api wants something else - i forget. maybe AEST? it’s confusing.
i try this in the lambda, to force the date:
from datetime import datetime, timezone
recording_event = event['detail']
recording_id = recording_event['recordingId']
created_time = recording_event['createdTime']
# Convert UTC time to AEST
utc_dt = datetime.fromisoformat(created_time.replace('Z', '+00:00'))
aest_dt = utc_dt.astimezone(timezone(timedelta(hours=10))) # AEST
formatted_date = aest_dt.strftime("%Y-%m-%dT%H:%M:%SZ")
# Now use formatted_date for your api call
fwiw, we had the same 400 error, the log is only this:
2024-10-26 10:00:01,123 - ERROR - Exception: 400 Client Error: Bad Request for url: /api/v2/recordings/{recordingId}/exports
maybe it’s the timezone? i hope this help. i am still new.