1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

Merge pull request #524 from GarrisonD/support/aws-lambda-invoke-invocation-type

Fixed issue with InvocationType header for AWS Lambda
This commit is contained in:
Wesley Beary 2019-06-07 08:17:47 -05:00 committed by GitHub
commit def0af094b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,8 +20,8 @@ module Fog
headers['X-Amz-Client-Context'] =
Base64::encode64(Fog::JSON.encode(client_context))
end
if client_type = params.delete('InvocationType')
headers['X-Amz-Client-Type'] = client_type
if invocation_type = params.delete('InvocationType')
headers['X-Amz-Invocation-Type'] = invocation_type
end
if log_type = params.delete('LogType')
headers['X-Amz-Log-Type'] = log_type
@ -51,12 +51,12 @@ module Fog
raise Fog::AWS::Lambda::Error, message
end
client_context = params.delete('ClientContext')
client_type = params.delete('InvocationType')
log_type = params.delete('LogType')
payload = params.delete('Payload')
client_context = params.delete('ClientContext')
invocation_type = params.delete('InvocationType')
log_type = params.delete('LogType')
payload = params.delete('Payload')
if (client_context || client_type || log_type)
if (client_context || invocation_type || log_type)
message = "invoke parameters handling are not yet mocked [light_black](#{caller.first})[/]"
Fog::Logger.warning message
Fog::Mock.not_implemented