-
Notifications
You must be signed in to change notification settings - Fork 1k
apigw-lambda-rekognition: Update for "Error: Unsupported argument" #2902
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
apigw-lambda-rekognition: Update for "Error: Unsupported argument" #2902
Conversation
…following destination configurations" error
| events = ["s3:ObjectCreated:*"] | ||
| } | ||
|
|
||
| depends_on = [aws_lambda_permission.allow_s3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
╷
│ Error: creating S3 Bucket (xxxxx-s3-upload) Notification: operation error S3: PutBucketNotificationConfiguration, https response error StatusCode: 400, RequestID: ZRGV6RJWYEZQXGDX, HostID: hB9Ze5FjoPl01sqeI3/PGRae4EM5YzhB/dKN1oI5V8kUP5c2t1zvsWwsGhHU8D94FtmL2uETUi8=, api error InvalidArgument: Unable to validate the following destination configurations
│
│ with aws_s3_bucket_notification.s3_bucket_notification,
│ on main.tf line 101, in resource "aws_s3_bucket_notification" "s3_bucket_notification":
│ 101: resource "aws_s3_bucket_notification" "s3_bucket_notification" {
│
╵
| curl -v --location --request PUT '<presigned-url>' --header 'Content-Type: image/png' --data '<path-of-the-object>.png' | ||
| ``` | ||
| curl -v --location --request PUT '<presigned-url>' --header 'Content-Type: image/png' --data-binary @image.png | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: --data '<path-of-the-object>.png' command upload not image file. We should use --data-binary option. I updated it and works good😀
|
Thanks @kakakakakku . One small suggestion since we are already updating this pattern - can you include the full APIGW URL in the outputs? I think it will make this step a little easier: |
|
Great, thanks! I'll add this to the publishing queue. |
Issue #, if available:
N/A
Description of changes:
Hi😀 Thanks for the useful patterns!
While testing
apigw-lambda-rekognition, I noticed that theError: Unsupported argumenterror occurred. Because aws_api_gateway_deployment does NOT havestage_nameargument in latest Terraform AWS Provider. We should use aws_api_gateway_stage.Check
And more the
generate-presigned-urlLambda function call Amazon Rekognition correctly.Thank you😀
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.