1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Your assumption is incorrect. There is no affinity between a shard and the specific Lambda instance that handles that shard. As to scaling, there will be between 1-10 instances running concurrently per each shard, depending on the configuration of the Parallelization Factor parameter in the event source mapping.
To achieve what you want you have two options:
- When using a Time Window you can return from an invocation a state object that you get back in the next invocation in the same shard. Note that the object is initialized every time a new window starts, so this can't be used if the data you need to processes takes longer the the window.
- Maintain the state outside the function, e.g., a DynamoDB table, and read it in each invocation and update it at the end of the invocation.
관련 콘텐츠
- AWS 공식업데이트됨 5년 전
- AWS 공식업데이트됨 6달 전
- AWS 공식업데이트됨 8달 전