I am currently using the API to publish a feature service from a File GDB in ArcGIS Online. This works fine. If I load this into an AWS lambda function however, the total time to execute is greater than the 29s allowed for a lambda function.
Are other methods, such as publishing from a .sd or cloning an existing feature service from within the same org (is this possible?), any faster than publishing from a File GDB hosted in arcgis online?
You can use the create service function located here: arcgis.gis module — arcgis 1.4.0 documentation .
Basically, to create the service and layers, you'll have to chain together create_service, update_definition and/or add_definition methods to build the service. I think this will be the fastest way but I haven't profiled anything.
>cloning an existing feature service from within the same org (is this possible?)
You can do this, but it will be the same calls as listed above plus some validation.