You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a recommend way to call sam cli commands from python?
For example, if I want to write some scripts to get the endpoints via something like sam list endpoints, analyze them, and coordinate those with other resources outside AWS, is there a recommend way to do something like that?
Since I like python it looks like my options are:
Use the subprocess module to call sam list endpoints or other sam commands from python.
Use CliRunner from click.testing to call sam commands.
Something else?
Any suggestions on the above would be appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there a recommend way to call sam cli commands from python?
For example, if I want to write some scripts to get the endpoints via something like
sam list endpoints
, analyze them, and coordinate those with other resources outside AWS, is there a recommend way to do something like that?Since I like python it looks like my options are:
subprocess
module to callsam list endpoints
or other sam commands from python.CliRunner
fromclick.testing
to call sam commands.Any suggestions on the above would be appreciated.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions