Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LambdaFunctionArn shouldn't be suffixed with the environment in the S3 event source #80

Merged
merged 1 commit into from
Aug 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
LambdaFunctionArn shouldn't be suffixed with the environment
When configuring the S3 bucket event the function `add` builds the `LambdaFunctionConfigurations` which specifies the `LambdaFunctionArn`. The ARN should be the functions *exact* ARN and not suffixed by the environment ex.`arn:aws:lambda:us-west-1:1234567890123:function:bigquery_commit:main-env`.

It makes the Lambda UI and the S3 event sources UI confused as they don't recognize that the specific Lambda function even exists.

The reason why I made this change is because I had problems applying the bucket event cross-account and could not do this without this change.
  • Loading branch information
iserko committed Aug 2, 2016
commit 4086df2dc426de7986985fc5d26a916e68e939fa
2 changes: 1 addition & 1 deletion kappa/event_source/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def add(self, function):
{
'Id': self._make_notification_id(function.name),
'Events': [e for e in self._config['events']],
'LambdaFunctionArn': '%s:%s' % (function.arn, function._context.environment),
'LambdaFunctionArn': function.arn,
}
]
}
Expand Down