(aws-s3-notifications): Unable to validate the following destination configurations.
See original GitHub issueWhat is the problem?
Error: An error occurred (InvalidArgument) when calling the PutBucketNotificationConfiguration operation: Unable to validate the following destination configurations. See the details in CloudWatch Log Stream:
Cloudwatch Log Stream didn’t seem to have further details.
Reproduction Steps
const importedBucketFromName = s3.Bucket.fromBucketName(
this,
'imported-bucket-from-name',
'bucket-name'
);
const importedLambdaFromArn = lambda.Function.fromFunctionArn(
this,
'external-lambda-from-arn',
'lambda-arn'
);
importedBucketFromName.addEventNotification(
s3.EventType.OBJECT_CREATED,
new s3n.LambdaDestination(importedLambdaFromArn),
{ prefix: 'test/', suffix: '.yaml' }
);
What did you expect to happen?
Bucket would have an event notification for the given config pointing to the lambda.
What actually happened?
Error shown was generated.
CDK CLI Version
2.2.0 (build 4f5c27c)
Framework Version
n/a
Node.js Version
16.11
OS
OSX
Language
Typescript
Language Version
TypeScript (4.4.4)
Other information
From what I have read this seems to be caused by a missing policy on either the S3 Bucket or Lambda function or both. My attempts to add these policies have not worked.
Perhaps this issue stems from both resources(lambda, bucket) being imported, and thus addEventNotification
is not able to add the required policies. Any workaround would be greatly apprecaited.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Avoid the "Unable to validate the following destination ...
I receive the following error: "Unable to validate the following destination configurations." When I try to set a dependency on the SNS topic ......
Read more >S3 Bucket Lambda Event: Unable to validate the following ...
You are getting this message because your s3 bucket is missing permissions for invoking your lambda function. According to AWS ...
Read more >What to do if you get an error “Unable to validate the following ...
Settings · Open the AWS Management Console. · Go to the Amazon SNS Settings page. · Click “Topic” in the left menu to...
Read more >"Unable to validate the following destination configurations ...
I am trying to write a serverless configuration for my service. A requirement is that the S3 bucket sends notifications to an SQS...
Read more >How do I resolve the validation error from Amazon S3 event ...
... avoid the error " Unable to validate the following destination configurations " when using S3 event notifications in AWS CloudFormation.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @NGL321, I am trying to plan feature development around this issue. I am wondering if it’s possible to get an idea of when this issue might be resolved. This way I can decide if it makes sense to look into a workaround.
Thanks in advance for any details.
I had the same issue. You need to set “sameEnvironment” flag to “true” in fromFunctionAttributes() to allow CDK has permission to update your external lambda function.
something like:
{ functionArn: 'my-arn', sameEnvironment: true }