How to add triggers on aws lambda alias


Hi all,

I am facing issue while adding triggers to the lambda function alias using command line. could you please help to resolve this issue. s3_trigger.json file below. { "LambdaFunctionConfigurations": [ { "LambdaFunctionArn": "arn:aws:lambda:us-east-1:Account_id:function:my_lambda:my_lambda_alias", "Events": [ "s3:ObjectCreated:*" ], "Filter": { "Key": { "FilterRules": [ { "Name": "Prefix", "Value": "incoming-file/" }, { "Name": "Suffix", "Value": ".json" } ] } } } ] }

aws s3api put-bucket-notification-configuration
--bucket "$env-$clientname-raw"
--notification-configuration file://s3_trigger.json

An error occurred (InvalidArgument) when calling the PutBucketNotificationConfiguration operation: Unable to validate the following destination configurations.

Thanks, Ankit

asked 3 months ago126 views
1 Answer


Is the following policy set in Lambda's access policy?

    "Version": "2012-10-17",
    "Id": "example-ID",
    "Statement": [
            "Sid": "s3invoke",
            "Effect": "Allow",
            "Principal": {
                "Service": ""
            "Action": "lambda:InvokeFunction",
            "Resource": "arn:aws:lambda:Region:account-id:function:function-name",
            "Condition": {
                "StringEquals": {
                    "AWS:SourceAccount": "bucket-owner-account-id"
                "ArnLike": {
                    "AWS:SourceArn": "arn:aws:s3:::awsexamplebucket1"
profile picture
answered 3 months ago
  • Thanks for your revert, My question is that can we add triggers to lambda function alias using command line.

  • Yes, it is possible to set triggers using commands. And I think the error you shared may occur when there is a problem with Lambda's resource-based policy, so I think you need to check it.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions