Skip to content

PreSignedUrl of createImportJob cant upload file .csv #6679

@khanwilson

Description

@khanwilson

Describe the issue

i have downloaded template.csv and include some row data in.
i want create job import users by aws sdk, by that step:

  • create CognitoIdentityServiceProvider
  • use provider.createUserImportJob(params) with params: JobName, UserPoolId, CloudWatchLogsRoleArn.
  • get PreSignedUrl from response createUserImportJob.
    call Put (by axios, postman) with header 'Content-Type': 'text/csv'. when time has valid but i always got 403
<Code>SignatureDoesNotMatch</Code>
   <Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>
Untitled
  • got that error so i cant run startImportJob.

With params of createUserImportJob, i have do manually on Amazon Cognito>User pools>my pool>Create import job. It run oke.
beside, i have check is my S3, i dont see any bucket name like https://aws-cognito-idp-user-import-lhr.s3.eu-west-2.amazonaws.com of first part in url PreSignedUrl. Why, createUserImportJob created link like that.
Untitled2

Please explain this problem, and help me solve it :(

Links

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CognitoIdentityServiceProvider.html#createUserImportJob-property

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.closed-for-stalenessp3This is a minor priority issueresponse-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions