Skip to content

Pinpoint APIs are failing at runtime with a cors issue #792

@Amplifiyer

Description

@Amplifiyer

Describe the bug
Pinpoint's update endpoint and API call is failing with the following error

// Console error
Access to fetch at 'https://pinpoint.us-west-2.amazonaws.com/v1/apps/__obfuscated__/endpoints/__obfuscated__' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

// Response hearders
content-length: 2456
content-type: application/json
date: Sat, 25 Jan 2020 01:02:08 GMT
status: 403
via: 1.1 e90b27f8a13d44c35911b9b6b13e0d9e.cloudfront.net (CloudFront)
x-amz-apigw-id: G1P-qGgXvHcFi_A=
x-amz-cf-id: 56kWeFE4uhA-MxTt9u3gd8fSqvJQQkZe95Vyvc3i8AUNyelf7jiu5Q==
x-amz-cf-pop: HIO50-C2
x-amzn-errortype: InvalidSignatureException
x-amzn-requestid: 25cc7e42-5206-4710-a5bb-ffeff6cabf2b
x-cache: Error from cloudfront

The Options request works fine but then on PUT request for both of the above APIs it fails

SDK version number
@aws-sdk/client-pinpoint@1.0.0-alpha.10

Is the issue in the browser/Node.js?
Browser

Details of the browser/Node.js version
Browsers:
Chrome: 79.0.3945.130
Safari: 13.0.4

To Reproduce (observed behavior)
Make a call to either UpdateEndpoint or PutEvents API

Expected behavior
There should be no error.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions