Skip to content

Support existing Function instances in Queue/DynamoDB subscriptions #124

@michal-stlv

Description

@michal-stlv

Proposed Solution

When an existing Function is passed to subscribe(), instead of trying to modify its config and recreate it, we:

  1. Use the existing function as-is
  2. Create a new IAM Policy with the required permissions (SQS or DynamoDB stream)
  3. Attach that policy to the function's existing role

Possible problem

Trouble might be to determine if function does not already have necessary permissions. Ideally we'd check and not create them if already there. Practically it will work anyway I guess. Needs some testing to evaluate what to do.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions