I want to send s3: CreateObject: * events to the SQS queue. But setting up the results of setting up notifications inA client error (InvalidArgument) occurred when calling the PutBucketNotificationConfiguration operation: Unable to validate the following destination configurations
This is how I created the bucket:
aws s3api create-bucket
This is how I created the SQS queue
aws sqs create-queue --profile default --queue-name my-queue --attributes file:
with attributes.json file
{
"DelaySeconds":"0",
"MessageRetentionPeriod":"3600",
"Policy":"{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":[\"sqs:SendMessage\",\"sqs:ReceiveMessage\"],\"Condition\":{\"ArnLike\": {\"aws:SourceArn\": \"arn:aws:s3:*:*:my-bucket\"}}}]}"
}
Finally, try setting up a notification that displays the error message above:
aws s3api put-bucket-notification-configuration --profile default --bucket my-bucket --notification-configuration file:
with notification.json file
{
"TopicConfigurations": [
],
"QueueConfigurations": [
{
"QueueArn": "arn:aws:sqs:eu-west-1:123456789012:my-queue",
"Events": [
"s3:ObjectCreated:*"
],
"Filter": {
"Key": {
"FilterRules": [
{
"Name": "prefix",
"Value": "my-filter"
}
]
}
}
}
],
"LambdaFunctionConfigurations": [
]
}
I really don't know where the error is. Thanks for any help!