405 method not allowed error when following below link - ajax

I followed the below link to do a similar setup with S3 static website + AWS API Gateway + AWS Lambda.
https://aws.amazon.com/blogs/architecture/create-dynamic-contact-forms-for-s3-static-websites-using-aws-lambda-amazon-api-gateway-and-amazon-ses/
I am getting 405 Method not allowed when I hit the submit button on the s3 form. I know S3 static web hosting doesn't allow POST. Is there a workaround for this?

Related

Trying to get downloadable url of the SharePoint file of the attachments shared in the teams/channel chat

We are trying to access the SharePoint url of the attachments shared in the teams/channel chat and for the teams meeting recording.
We have used Oauth2 to retrieve the auth token and using Microsoft graph api to get the downloadable/public url for the same
making a GET request with token in the request header still returns 401 Unauthorised error
Although we are able to get the downloadable url if we use site-id , list-id and item-id in the GET request https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items/{item}/driveitem
But these are not available when our message extension app is invoked from a message
Posting the Answer for better knowledge
Copying from #Saonti comments
Using Graph API explorer are you able to get the drive item with this API graph.microsoft.com/v1.0/sites/%7Bsite-id%7D/lists/… ? Or you are getting error?

How should I diagnose an HTTP request 500 that appears to be related to Authorizers in AWS API Gateway?

I am brand new to AWS API Gateway/AWS Lambda/AWS Amplify. I have a React Native application that I am trying to use AWS Amplify to make an API call and issue a PUT request, which would then cause the API Gateway to invoke my AWS Lambda function. When I create the AWS Amplify API endpoint, I don't see a command line option to define a PUT method. The default is "Any", which works, but I would like to specify a PUT method specifically. When I add in a PUT method manually on the API Gateway website and then call it from my React Native front end, I get...
Error: Request failed with status code 500
Looking at the API Gateway responses, this is due to either an "Authorizer Configuration Error" or an "Authorizer Failure", so I am assuming the problem is not with my front end code but with the configuration of "authorizers" on the API Gateway. What are authorizers? How do they relate to making an API call? And what steps can I take to troubleshoot what the problem might be?
You can use a lambda, a Cognito User Pool or an IaM role as an Authorizer. The short version is that your API endpoints can either be open and public or have an Authorizer, if they have an authorizer then they have to be setup correctly. It is set through the API Gateway config for an endpoint in the Method Request section.
AWS Lambda authorizer info:
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html
AWS Cognito Info:
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-cognito.html

laravel authantication error with google API

I have been using Socilte Package for users login, I am using Facebook and Google.
Facebook is working fine but Google API is not working,
Showing an error while returning from Google.
403 - Forbidden
The Web server is configured to not list the contents of this directory or you do not have enough permissions to access the resource
Error is similar to this post
But I didn't found solution in this post. Google+ API is also enabled and no issue with credentials.
Domain is verified.

Sqaure Payment Gateway Checkout API CORS Issue

I tried to integrate Square Payment gateway in my application, but i'm getting following error enter image description here
I've tested it through postman. It's working fine in postman.
It looks like you're attempting to do the HTTP request from the frontend browser (JavaScript). Square doesn't allow that with one of the most important reasons being that anyone would be able to access your personal access token and thus have access to your account.
With that said, you need to create your HTTP request in a back-end service using something like PHP/Java/Ruby/Node.js, etc.

How to restrict access from invoking API URL?

As shown above one of my lambda function HelloCloudGurus which trigger by API gateway and it can be triggered by the API link as below:
https://APIServiceID.execute-api.ap-southeast-1.amazonaws.com/prod/HelloCloudGurus
When I click on the link it shows that I can still access the link despite the Authorization has been set to AWS_IAM?
How to configure it so that it will validate signature on request and return me something like below?
{"message":"Missing Authentication Token"}
Please use Cognito. You can still acheive it by API Gateway Custom Authorizer but Cognito is the right candidate for security. Have a read on below AWS documentation for custom authorizer,
http://docs.aws.amazon.com/apigateway/latest/developerguide/use-custom-authorizer.html

Resources