aws-amplify / amplify-category-api

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
https://docs.amplify.aws/
Apache License 2.0
87 stars 73 forks source link

auto merge strategy with custom lambda fails on push #1732

Open ykethan opened 1 year ago

ykethan commented 1 year ago

How did you install the Amplify CLI?

No response

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

No response

Amplify CLI Version

12.2.2

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

no

Describe the bug

updating an GraphQL API with Conflict resolution strategy enabled and Custom lambda on both default resolution strategy and per model fails on a push with

πŸ›‘ The following resources failed to deploy:
Resource Name: ConnectionStack (AWS::CloudFormation::Stack)
Event Type: create
Reason: Template error: unresolved condition dependency HasEnvironmentParameter in Fn::If

πŸ›‘ Resource is not in the state stackUpdateComplete
Name: ConnectionStack (AWS::CloudFormation::Stack), Event Type: create, Reason: Template error: unresolved condition dependency HasEnvironmentParameter in Fn::If, IsCustomResource: false

Expected behavior

better error messaging and expected workflow

Reproduction steps

  1. create new application
  2. create a lambda function(default is fine)
  3. create Graphql API
  4. add a data models(example 3 models)
  5. update api
  6. enable Conflict resolution strategy
  7. select Custom Lambda -> Existing Lambda Function
  8. Do you want to override default per model settings? y
  9. select one model (spacebar)
  10. select Custom Lambda -> Existing Lambda Function
  11. amplify push

Project Identifier

3e6e944cc1953d02fe66dbb764200740

Log output

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

Additional information

No response

Before submitting, please confirm:

AnilMaktala commented 1 year ago

Hey @ykethan, Thank for raising this issue. Marking this as a bug for the team to evaluate further.

antoineberthelin commented 1 year ago

Hello @ykethan ,

Same error on my side, do you have a workaround ?

Have a nice day.

Thanks

antoineberthelin commented 11 months ago

Hello @AnilMaktala

Could you give me the status of this issue ? I need it.

Thanks for your feedback

antoineberthelin commented 11 months ago

Hello, FYI Just found a workaround in similar issue https://github.com/aws-amplify/amplify-category-api/issues/628