I tried to implement Post request that work in postman and i want that
it will work in aws getway as well .
i didnt find any option in aws to put the "x-www-form-urlencoded" that i can find in postman
but not in aws service.
enter image description here
enter image description here
Related
From the documentation it looks like I can attain a token for a cluster to query EKS REST API, and I've got the token in this format : k8s-aws-v1.aHR0cHM6Ly9zdHMuYXAtc291dGgtMS5hbWF6b25hd3MuY29......
But when I try to use this token in Postman against the endpoint https://APISERVER/clusters?maxResults=5&nextToken=nextToken HTTP/1.1
I get the following
enter image description here
Looks like I'm missing some permissions here, how do I assign them?
Another question I have I can't seem to run kubectl commands on AWS cloud shell? (could do it on other clouds)
Thanks
I've got an jpeg image stored in a bucket using Amazon S3. I've followed this guide roughly to setup a REST API as an Amazon S3 Proxy in API Gateway. I'm using this API endpoint as way to access the images stored in the bucket using a GET request. I've also followed along with this guide that provides insight in enabling binary support. When I do a GET request at the given endpoint of the image, I want the image to show. The problem is that even following that guide, it doesn't work. The image doesn't show properly and I'm left with some junk:
Does anyone have any insight on this issue or a way they enabled binary support on their API endpoints?
I am trying to get application ID for sending a message from AWS Pinpoint through Postman, But I am unable to get the Application ID.
/v1/apps/application-id/messages
This is the application ID That I want. Can you guys help me to get that. I need to implement AWS pinpoint Message to my PHP Project.
If you have an existing Amazon Pinpoint application, you can retrieve the Pinpoint Project-ID or application-ID using the following options :
1) Amazon Pinpoint Console :
or
2) Amazon Pinpoint CLI "get-apps" command as shown below:-
3) Amazon Pinpoint REST API using tools like :
a) Postman: Using this Amazon Pinpoint tutorial for POSTMAN, you can setup Postman and use it to perform Amazon Pinpoint actions including retrieval Pinpoint application ID or project ID by calling the "GetApps" or "GetApp" API.
b) awscurl: A sample illustration of how to use awscurl to retrieve Pinpoint Application ID or project ID is given below :
$ awscurl -H "Content-type: application/json" --service mobiletargeting https://pinpoint.us-east-1.amazonaws.com/v1/apps/
Maybe I can get you started.
Summary: You are referring to the application-id that is the PATH component of the POST URL for sending a direct message from Pinpoint to a recipient, which is discussed here:
https://docs.aws.amazon.com/pinpoint/latest/apireference/rest-api-messages.html
The application-id identifies the app instance that will receive the message from Pinpoint.
Solution: I donĀ“t know the device or execution context of your project.
However, according to the Pinpoint documentation, the Amazon Pinpoint management console or the Amazon Pinpoint REST API enable you to send push notifications to a recipient, regardless of the recipientĀ“s device type or platform (see "Using Amazon Pinpoint to send push notifications" at the following URL: https://aws.amazon.com/pinpoint/push-notification-services/).
Using the Pinpoint REST API, you get the application-id from Pinpoint when you create an app of your project. See the HTTP POST method of the apps resource page here:
https://docs.aws.amazon.com/pinpoint/latest/apireference/rest-api-apps.html
The POST method creates an app, and its ApplicationResponse schema contains the id attribute that is "The unique ID for the application."
Hope this helps.
I get an error while invoking the AWS SageMaker endpoint API from a Lambda function. When I call this using Postman, I am getting an error like:
{
"errorMessage": "module initialization error"
}
Just to make it clear, you can't call SageMaker endpoints directly using PostMan (even if it is, it would not be straightforward).
You may need to use AWS SDK (i.e. boto) for that.
Ref : https://aws.amazon.com/blogs/machine-learning/call-an-amazon-sagemaker-model-endpoint-using-amazon-api-gateway-and-aws-lambda/
What I would suggest is to create a small HTTP server with Flask and use the AWS SDK (Boto) to call the endpoint. Then you can call your Flask endpoint using PostMan.
We recommend using AWS SDK to invoke your endpoint. AWS SDK clients handle the serialization for you as well as request signing, etc. It would be really hard to get it right manually with postman.
We have the SDK client available in many languages, including Java, Python, JS, etc.
https://docs.aws.amazon.com/sagemaker/latest/dg/API_runtime_InvokeEndpoint.html#API_runtime_InvokeEndpoint_SeeAlso
Next time please include more details in your question. eg. POST request data, Headers etc.
Anyways, to help you out in calling Sagemaker endpoint using Postman -
In 'Authorization' tab, select type as 'AWS Signature'.
Enter your Access and Secret key of the IAM user which has permission to Sagemaker resources.
Enter the AWS region. eg.us-east-1
Enter 'Service Name' as 'sagemaker'
Select the right content type. Some ML algorithms only accept 'text/csv'.
Select request type as 'POST'
Enter the Sagemaker Invocation url. eg:'https://runtime.sagemaker.us-east-1.amazonaws.com/endpoints/xgboost-xxxx-xx-xx-xx-xx-xx-xxx/invocations'
Try it out and let me know if you have any issues.
Here is how your Postman should look -
i was trying to create a rest api which can take zip file as input (PUT requst) and store that on S3.
I'm following the tutorial on http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-content-encodings-examples-image-s3.html
I'm getting 500 error ad the cloudwatch logs are as follows
Verifying Usage Plan for request:
c2140431-1a10-11e7-9f32-0df3853848fe. API Key: API Stage:
xjjd186a30/rd
API Key authorized because method 'PUT /s3' does not require API Key.
Request will not contribute to throttle or quota limits
Usage Plan check succeeded for API Key and API Stage xjjd186a30/rd
Starting execution for request: c2140431-1a10-11e7-9f32-0df3853848fe
HTTP Method: PUT, Resource Path: /s3
Successfully completed execution
Method completed with status: 500
when i try the api from post man i get
AccessDeniedAccess
DeniedF55D45C185A5BF11HXopfmxAxGNvmdi7PRp4c1j/wPYmGVTrkKbGXfZwofLOn7TRBPs3uFjer/2UCIktynKtGeNU1Xw=
my roles i have given AmazonS3FullAccess permission and have assigned the role to api gateway settings and the integration request.
can anyone help please
It looks like you are attempting to put to the bucket named rest.
Is that the correct bucket?
This documentation will probably be a little more helpful for you:
Integrating API with AWS S3
In the example in used in the documentation, a bucket and object are provided in the path override for the PUT item method. These are mapped from the path params folder and item.
Here is a helpful screenshot:
If you want to upload the binary files like mp3,audio, documents etc..., you can add an entry with value multipart/form-data in the Binary support in AWS API Gateway settings and post/put the binary file using the header Content-Type = multipart/form-data from postman or api client. It should work..!!
api gateway-binary support image