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

Conversation

iserko
Copy link
Contributor

@iserko iserko commented Aug 2, 2016

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.

Update: ok I see that anything that comes after the function ARN is a version and/or alias http://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases-permissions.html ... just means that the UI can't handle these

Comments about this?

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.
@Miserlou
Copy link

Miserlou commented Aug 9, 2016

+1 +1 +1!

Please merge and publish ASAP!

Related to

#81
and
Miserlou/Zappa#225

@iserko iserko changed the title LambdaFunctionArn shouldn't be suffixed with the environment LambdaFunctionArn shouldn't be suffixed with the environment in the S3 event source Aug 9, 2016
@iserko
Copy link
Contributor Author

iserko commented Aug 9, 2016

@Miserlou this only tackled the S3 event source and not the SNS event source as specified in Miserlou/Zappa#225 (amended the title because of it) ... we'd need to extend this into all the event sources to fix that specific issue

@josegonzalez
Copy link
Contributor

@iserko can you do that?

@iserko
Copy link
Contributor Author

iserko commented Aug 9, 2016

@josegonzalez do you have any comments on how versioning is done at the moment?

@Miserlou
Copy link

From the code, it looks like S3 is the only odd one out, all the other event sources behave like the PR already.

@iserko
Copy link
Contributor Author

iserko commented Aug 11, 2016

@Miserlou hah you're right 😄

@josegonzalez this should be fine to merge as it basically brings it in sync with the rest of the event sources

@iserko
Copy link
Contributor Author

iserko commented Aug 11, 2016

This change was introduced by #75
@msessa-cotd can you comment on why you added the function suffix in that PR?
Your PR says

Also fixes a bug on the S3 datasource where the lambda function ARN does not include the qualifier.

In what way was it a bug?

@Miserlou
Copy link

Bump! Any reason this can't be merged?

@iserko
Copy link
Contributor Author

iserko commented Aug 15, 2016

@Miserlou I'm happy for this to be merged ... up to @josegonzalez

@josegonzalez josegonzalez merged commit 62e7754 into garnaat:develop Aug 15, 2016
@Miserlou
Copy link

Can we get a 6.0.1? :-) @josegonzalez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants