You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
My intent is to create an aliased Lambda function and have a S3 bucket configured to invoke the aliased lambda when an object is created in that bucket.
Using AWS::Serverless::Function and the Events subkey, I can configure a non-aliased lambda function to be invoked.
However, I don't know how to make S3 invoke an aliased lambda function using the SAM template. I couldn't find documentation so I am guessing this is a feature request?
I was able to create an alias for my lambda function using AWS::Lambda::Alias but am unable to configure S3 with the ARN of the aliased lambda.
@RAbraham This is now the default behavior if you use/set the AutoPublishAlias Property on the AWS::Serverless::Function. Said explicitly, SAM will wire up event sources to the Alias if this field is set, otherwise will connect events to the Lambda Function.
Resolving since this is now fully supported in SAM
"Create the alias using AWS::Lambda::Alias resource and use !GetAtt .Arn in the S3 Event specification to point to the alias."
This doesn't make sense. On what property of the S3 Event specification would you set the Arn of the Lambda alias? The documentation only describes 3 possible properties, none of which are relevant:
Activity
sanathkr commentedon Jun 28, 2017
Create the alias using
AWS::Lambda::Aliasresource and use!GetAtt <logical-id-of-alias>.Arnin the S3 Event specification to point to the alias.jfuss commentedon Jan 21, 2018
@RAbraham This is now the default behavior if you use/set the
AutoPublishAliasProperty on theAWS::Serverless::Function. Said explicitly, SAM will wire up event sources to the Alias if this field is set, otherwise will connect events to the Lambda Function.Resolving since this is now fully supported in SAM
RAbraham commentedon Jan 22, 2018
Thanks!
smber1 commentedon Jul 8, 2018
Awesome, was wondering just this!
sharabash commentedon Nov 9, 2018
"Create the alias using AWS::Lambda::Alias resource and use !GetAtt .Arn in the S3 Event specification to point to the alias."
This doesn't make sense. On what property of the S3 Event specification would you set the Arn of the Lambda alias? The documentation only describes 3 possible properties, none of which are relevant:
https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#s3
"Bucket," "Events," and "Filter"...
Feat lambda urls (#128)