1 Answer
- Newest
- Most votes
- Most comments
0
Hello Stefan,
Not sure if you can do it directly in the API Gateway,
but you could integrate a lambda function that validates the token and returns the token to the api gateway. If the token is present, forward the event to eventbridge.
Something like that ( + the eventbridge forwarding logic) :
def lambda_handler(event, context):
headers = event.get('headers', {})
validation_token = headers.get('Validation-Token')
if validation_token:
# Validation token present, return it as a response
return {
'statusCode': 200,
'headers': {
'Content-Type': 'application/json'
},
'body': json.dumps({'validationToken': validation_token})
}
Sincerely
Heiko
answered 4 months ago
Relevant content
- Accepted Answerasked 12 days ago
- asked 4 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 9 months ago
Thank you Heiko. That is what i thought of. If it is a validation POST handle it by a Lambda otherwise transform and forward to event bridge. But it seems that there is no way to configure something like this in API Gateway - or i just havent found it :-(