How to update advanced settings of AWS Amplify resources through Amplify CLI?

0

Hi all, I am facing some drawbacks using Amplify in a back-end project with Cognito (auth), API Gateway (api) and S3 (storage). I hope someone could help me and I would like some orientation how to work with that limitation:

After I add a resource in Amplify CLI I am unable to return and apply more advanced settings through the Amplify CLI running “Amplify update <resource>”. For that reason I decided to manually apply the changes directly thought the console.

Two cases of manual changes in the console (due Amplify CLI limitations):

  • I need to set Post-Confirmation or Pre-Signup Cognito Triggers through the console;
  • I need to set an Authorizer to the API Gateway requests through the console;

The problem is that every time I create or update any resource with Amplify CLI, all resources are reset to the initial settings and my manual changes are lost. That is quite expected because CloudFormation (Amplify generated) does not have information about my manual changes. So every time it occurs I have to go back to the console do all settings again. It's a waste of time and error prone. Probably there is a solution for that issue.

A radical alternative could be recreate all Amplify resources passing through the advanced workflow, but also it's very annoying to realize that any time I could need to change any further setting I should have to recreate all resources again.

1 Answer
0

To update the advanced settings of AWS Amplify resources through the Amplify CLI, you can follow these steps:

  1. Open a terminal or command prompt and navigate to your Amplify project directory.
  2. Run the following command to launch the Amplify console: "amplify console". This command will open the Amplify console in your default web browser.
  3. In the Amplify console, click on the "Backend" section on the left-hand side.
  4. Under the "Backend environments" section, select the environment for which you want to update the advanced settings.
  5. In the environment dashboard, you will see the list of resources provisioned for that environment. Click on the specific resource you want to update.
  6. In the resource detail page, you will find the "Advanced settings" section. This section contains the configuration options for the selected resource.
  7. Make the necessary changes to the advanced settings. The available options depend on the type of resource you are modifying.
  8. After making the changes, click on the "Save" button to apply the updates.

The Amplify console will then update the advanced settings of the selected resource based on your modifications.

Alternatively, if you prefer to update the advanced settings through the CLI directly, you can use the amplify update <category> command, replacing <category> with the specific category of the resource you want to update (e.g., amplify update auth for authentication settings). This command allows you to modify the advanced settings of the resource directly from the command line.

Remember to sync your changes with the Amplify backend by running amplify push after making any updates to ensure that the changes are applied to the AWS resources in your account.

answered a year ago
  • Sorry, your response is inaccurate and the steps 6, 7 and 8 are not applicable. It seems pretty much an AI generated response

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions