Amplify-cli: How can I run amplify function push so that it only pushes up one function, not all?

Created on 6 Aug 2020  路  2Comments  路  Source: aws-amplify/amplify-cli

Which Category is your question related to?
Function

Amplify CLI Version
4.26.0

What AWS Services are you utilizing?
Lambdas (function), API Gateway (api) and Cognito (auth)

Provide additional details e.g. code snippets
When I run the following command, where tables is my function name

amplify push function tables

It shows this:

位 amplify push function tables

Current Environment: dev

| Category | Resource name | Operation | Provider plugin   |
| -------- | ------------- | --------- | ----------------- |
| Function | tables        | No Change | awscloudformation |

No changes detected

When I run amplify push, I am able to add --force and it will auto push the function even if there are no changes. I have to use the --force command since I use typescript and for some reason amplify doesn't recognize the generated js files in my dist folder (in the same location as the src folder). So I need the force command.

However, When I run amplify push function tables --force, it will not push the function.

This means that I have to run amplify push --force for one small change. Is there a --force command for amplify push function <funcName>?

Most helpful comment

we currently doesn't support this functionality: amplify push function <funcName> --force. For the workaround you can do amplify push --force.
If you are stuck one something feel free to comment and I will reopen this issue again

Hi @akshbhu - are there any intentions to support this functionality in the future? We have a project with numerous lambda functions and pushing all of them slows down our development iteration.

Thanks very much.

All 2 comments

Hi @danielmhair

we currently doesn't support this functionality: amplify push function <funcName> --force. For the workaround you can do amplify push --force.
If you are stuck one something feel free to comment and I will reopen this issue again

we currently doesn't support this functionality: amplify push function <funcName> --force. For the workaround you can do amplify push --force.
If you are stuck one something feel free to comment and I will reopen this issue again

Hi @akshbhu - are there any intentions to support this functionality in the future? We have a project with numerous lambda functions and pushing all of them slows down our development iteration.

Thanks very much.

Was this page helpful?
0 / 5 - 0 ratings