Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customized 'dependsOn' in backend-config.json gets overwritten #9472

Closed
4 tasks done
mgarabedian opened this issue Jan 10, 2022 · 4 comments
Closed
4 tasks done

Customized 'dependsOn' in backend-config.json gets overwritten #9472

mgarabedian opened this issue Jan 10, 2022 · 4 comments
Labels
extensibility Issues related to expand or customize current configuration functions Issues tied to the functions category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage

Comments

@mgarabedian
Copy link

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?

No response

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

No response

Amplify CLI Version

7.6.5

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.

customized dependsOn of Function config in backend-config.json

Amplify Categories

function

Amplify Commands

update

Describe the bug

When running "amplify update function", customizations in backend-config.json are overwritten. I am referencing the 'custom' category in the dependsOn. Example:


   "LambdaFnName": {
      "build": true,
      "providerPlugin": "awscloudformation",
      "service": "Lambda",
      "dependsOn": [
        {
          "category": "storage",
          "resourceName": "StorageName",
          "attributes": [
            "BucketName"
          ]
        },
        {
          "category": "custom",
          "resourceName": "CustomResourceCreatedWithAmplifyAddCustom",
          "attributes": [
            "CustomOuput"
          ]
        }
      ]
    }

Expected behavior

I expect those parameters to stay until the CLI itself supports them. In this case, resource access for the custom category is still not supported.

Reproduction steps

  1. Customize backend-config.json, pointing to a custom resource.
  2. Then amplify update function and modify something.
  3. See that its gone.

GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line


Additional information

No response

@johnpc johnpc added the pending-triage Issue is pending triage label Jan 14, 2022
@johnpc
Copy link
Contributor

johnpc commented Jan 14, 2022

Did you follow the instructions from https://docs.amplify.aws/cli/custom/cdk/? I would not expect you to have to manually update your backend-config.json file

@johnpc johnpc added extensibility Issues related to expand or customize current configuration functions Issues tied to the functions category pending-response Issue is pending response from the issue author and removed pending-triage Issue is pending triage labels Jan 14, 2022
@nathanagez
Copy link

@johnpc I think this issue is related to these issues:

#9087
#9055

We need the ability to output variables from custom CDK code to the rest of amplify

@josefaidt josefaidt added pending-triage Issue is pending triage and removed pending-response Issue is pending response from the issue author labels Apr 11, 2022
@josefaidt
Copy link
Contributor

Hey @nathanagez 👋 apologies for the delay here! Are you still experiencing this issue? If so, it is possible to reference Amplify-generated resources from within the custom resource and feed a custom parameter. Could you share a snippet of what you'd like to add to your Lambda?

@josefaidt josefaidt added the pending-response Issue is pending response from the issue author label Apr 12, 2022
@josefaidt
Copy link
Contributor

Closing due to inactivity. @mgarabedian if you are still experiencing this issue please reply back to this thread and we can re-open to investigate further 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensibility Issues related to expand or customize current configuration functions Issues tied to the functions category pending-response Issue is pending response from the issue author pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

4 participants