1

I'm trying to get an Alexa skill to call a lambda function which sends a message to an SQS Queue. Basically what this guide is doing http://www.cyber-omelette.com/2017/01/alexa-run-script.html

I have the skill and lambda function working, when I execute the skill I get the proper response that's created in the lambda function. However sometimes the Queue gets the message and other times it doesn't, it seems completely random. Is there something that may be causing messages to be dropped/ignored?

1
  • What kind of messages are you providing to your you SQS topic? What is an invocation type of your lambda (sync/async)? Do you have any logs by your lambda (cloud watch)? Commented Sep 27, 2018 at 23:34

1 Answer 1

1

In your lambda function, make sure you process ALL the messages received by the lambda function, and not just the first one. ``` def handler(event, context): result={}

logger.debug(json.dumps(event))
for record in event['Records']:
    message=json.loads(record['body'])
    #do whatever you have to do with the message

```

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.