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

Command `amplify add function` in Headless Mode #13557

Open gunsleobezerra opened 7 months ago

gunsleobezerra commented 7 months ago

Is this feature request related to a new or existing Amplify category?

function

Is this related to another service?

No response

Describe the feature you'd like to request

I'm working with AWS Amplify and looking for a way to automate the "amplify add function" command, ideally in a headless or scriptable format. My goal is to integrate this into a larger automation script. Unfortunately, it seems that the Amplify CLI does not natively support headless mode for this particular command.

Is there any known workaround or alternative method to achieve this? Any suggestions or guidance on how to approach this automation would be very helpful.

image

Describe the solution you'd like

i don't have any solution !

Describe alternatives you've considered

I tried to use python to interact with console and walk trought to the steps but isn't works and i got many bugs! If exist any solution with AWS SDK please give to me , because it's solve my problem better than amplify CLI.

Additional context

No response

Is this something that you'd be interested in working on?

Would this feature include a breaking change?

ykethan commented 7 months ago

Hey, 👋 thanks for raising this! Marking as feature-request. Unfortunately, you will need to script out the file creation and references in the backend-config.json and team-provider-info.json to automate the creation process(https://github.com/aws-amplify/amplify-cli/tree/dev/packages/amplify-category-function). But I would suggest throughly testing this in your test environment.