aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.81k stars 821 forks source link

7.5.2 produces wrong APIGatewayAuthURL on windows #9091

Closed hebelt closed 2 years ago

hebelt commented 2 years ago

Before opening, please confirm:

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v14.15.1

Amplify CLI Version

7.5.2

What operating system are you using?

Windows

Amplify Categories

auth, api

Amplify Commands

push

Describe the bug

After changing some options in api and upgrading from 7.5.1, i receive the following error:

templateurl must be a supported url amplify

Checking the files, with git diff show up the following: "APIGatewayAuthURL": "https://s3.amazonaws.com/amplify-*-deployment/amplify-cfn-templates/api\\APIGatewayAuthStack.json"

When i correct the \ to / after entering amplify push and before acknowledging the changes of the graphQL-Files, i can push the

Expected behavior

the url should be generated correctly on windows system

"APIGatewayAuthURL": "https://s3.amazonaws.com/amplify-*-deployment/amplify-cfn-templates/api/APIGatewayAuthStack.json"

Reproduction steps

  1. install 7.5.1
  2. create api (graphql with public access)/auth
  3. install 7.5.2
  4. update graphql to use auth (cognito user pool, instead of public)
  5. amplify push

GraphQL schema(s)

```graphql # Put schemas below this line type Bank @model @auth(rules: [{ allow: owner }]) { } ```

Log output

``` # Put your logs below this line ```

Additional information

No response

hebelt commented 2 years ago

The problems occurs everytime you call "amplify push".

If you need to publish something right now on windows, you can patch your file locally (dirty and fast :)):

%AppData%\npm\node_modules\@aws-amplify\cli\node_modules\amplify-provider-awscloudformation\lib\utils\consolidate-apigw-policies.js

const S3_UPLOAD_PATH = amplify_cli_core_1.AmplifyCategories.API + /${exports.APIGW_AUTH_STACK_LOGICAL_ID}.json;

it would be nice, if this bugfix will be released soon.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.