- Newest
- Most votes
- Most comments
Absolutely! I understand your requirement for a Lambda function that can help in automating the “process of manually updating the message for each week“, to determine the week number and help to play the appropriate message.
As already answered above, there is a helpful resource provided by Amazon Connect called the "Sample Lambda integration flow"[1]. This flow serves as an example that demonstrates the integration of Lambda functions with Amazon Connect. It can serve as a valuable reference for your specific needs. The detailed instructions and an example Lambda code snippet in the official AWS documentation on Lambda functions within Amazon Connect. The documentation[2] provides step-by-step guidance and code sample that you can easily adapt and utilize within your environment.
[1] Sample Lambda integration - https://docs.aws.amazon.com/connect/latest/adminguide/sample-lambda-integration.html
[2] Invoke AWS Lambda functions - https://docs.aws.amazon.com/connect/latest/adminguide/connect-lambda-functions.html.
You are right, you need a simple Lambda to do this that calculates a flag and return it as an attribute so you can use it as a branching decision to play the right prompt. If you are new to Lambda, there is a Sample Lambda integration flow in Amazon Connect.
You can refer to this page to have an example of a sample Lambda that you can easily copy-paste and use in your environment : https://docs.aws.amazon.com/connect/latest/adminguide/connect-lambda-functions.html
A super simple lambda will do this for you, in python:
date = datetime.date(2023, 7, 8) week = dt.isocalendar()[1]
david
Relevant content
- asked 2 months ago
- AWS OFFICIALUpdated 3 years ago

Please tag the answer as accepted answer if you feel it has provided the response to your query. Thanks a lot.