By using AWS re:Post, you agree to the Terms of Use

Questions tagged with Application Integration

Sort by most recent
  • 1
  • 2
  • 12 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Unable to pass aws.events.event.json in input transformer template

I am using eventbridge to trigger batch run through custom put-events request(using boto3). My request is as follows :- ```python INPUT_DATA = { "data":[List<Dict>], # i.e. data key has list value where each list item is dict "sample_key":"sample_string_value" } client = boto3.client("events") response = client.put_events(Entries=[ { "Source": "my.app.com", "Detail": json.dumps(INPUT_DATA), "DetailType":"sample-type", "EventBusName":"my-event-bus" } ]) ``` In order to pass data from eventbridge to batch, I have following input transformer template :- ```terraform input_paths = { } input_template = <<EOF { "ContainerOverrides": { "Environment": [ { "Name": "PAYLOAD", "Value": "<aws.events.event.json>" } ] } } EOF ``` where `aws.events.event.json` is pre-defined variable for event payload(i.e. detail key value) as *string*. When I run the script, I am able to see metric for `triggeredRule`with `1` but invocation for batch run fails i.e. `failedInvocations` count as `1` is also seen in the metrics. At the same time, if replace `aws.events.event.json` with `aws.events.rule-arn` or `aws.events.rule-name` or `aws.events.event.ingestion-time`, batch run is triggered and correct values of latter variables is also seen in job descriptions's environment section. I tried to refer similar issue [here](https://repost.aws/questions/QUCMU-UIYoThyQqlkCn2sWEQ/eventbridge-input-transformer-example-doesnt-work) but it does not seem solve the issue. Can someone suggest where is the issue in above input transformer while using `aws.events.event.json` ? Is it due format of `INPUT_DATA` that I am sending ? Would appreciate any hint. Thanks
1
answers
0
votes
56
views
asked 4 months ago

Lambda Function returned an error in Connect Contact Flow logs, but Lambda itself working fine

I have set up a configuration between Salesforce and AWS Connect. In this configuration Amazon provided us with built-in Lambda package that is used to add, update or lookup Salesforce records. In my case, I am using this lambda package for lookup into salesforce. Salesforce save data in the form of Contact and Account. When I try to fetch data from Salesforce Contact using lambda function in Connect Contact Flow, it works absolutely fine. But when I try to fetch Salesforce Account fields using Lambda function in Connect Contact Flow, It is not working. Although Connect Contact Flow properly calls my lambda function, and Lambda function is working fine as you can see my lambda function logs below: ``` Response: { "searchRecords": [ { "attributes": { "type": "Contact", "url": "/services/data/v48.0/sobjects/Contact/0035pWFcaAAG" }, "Id": "0035p00003dWFcaAAG", "Name": "Artur Bensch", "Account": { "attributes": { "type": "Account", "url": "/services/data/v48.0/sobjects/Account/0015p000OcQAAV" }, "City_CB__c": "Cologne" } }, { "attributes": { "type": "Contact", "url": "/services/data/v48.0/sobjects/Contact/0035p000xtxAAA" }, "Id": "0035p000txAAA", "Name": "test us", "Account": { "attributes": { "type": "Account", "url": "/services/data/v48.0/sobjects/Account/0015p00ts3SAAQ" }, "City_CB__c": "Berlin" } } ] } ``` It is not throwing any error, I have checked all logs very carefully, but when I see contact flow logs, it says "The Lambda Function Returned An Error." Also you can see in the Contact Flow logs. ``` { "Results": "The Lambda Function Returned An Error.", "ContactId": "ab679f96-a75f-4fdfc-8sdfds0-a656542e2f8", "ContactFlowId": "arn:aws:connect:eu-central-1:048600317115:instance/ba40-72b-a94d-a5b3bfde8b2f/contact-flow/b8fb79cc", "ContactFlowName": "outboundWhisperFlow", "ContactFlowModuleType": "InvokeExternalResource", "Timestamp": "2022-05-30T06:43:58.108Z", "Parameters": { "FunctionArn": "arn:aws:lambda:eu-central-1:048600317115:function:serverlessrepo-AmazonConnectSalesforce-sfInvokeAPI-JrqDuYg", "Parameters": { "sf_operation": "phoneLookup", "sf_phone": ".+4915251121195", "sf_fields": "Id, Name, account.City_CB__c" }, "TimeLimit": "8000" } } ``` It is very unexpected behavior by Contact Flow logs, because my Lambda function is running without any error then why contact flow is saying Lambda Function returned an error, it is very frustrating.
2
answers
0
votes
67
views
asked 4 months ago
0
answers
0
votes
26
views
asked 6 months ago
  • 1
  • 2
  • 12 / page