How to run `AWS CLI` command within `aws lambda` function?
<p>I would like to run <a href="https://aws.amazon.com/cli/" rel="nofollow"><code>aws cli</code></a> command (actually <a href="https://docs.aws.amazon.com/cli/latest/reference/s3/sync.html" rel="nofollow"><code>aws s3 sync</code></a>) from within the <code>aws lambda function</code>. How do I do that? Ideally in <code>python</code>, but <code>javascript</code> (or <code>java</code>) would work too.</p>

<p>Using <code>python</code> I tried achieving this by <a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html" rel="nofollow"><code>Creating a Deployment Package</code></a> where i would have <a href="https://pypi.python.org/pypi/awscli" rel="nofollow"><code>awscli</code></a> as a python package, so that I can use it later.
However, the <code>aws</code> command is not available during lambda function execution, and only the <code>awscli</code> package is.</p>

<p>How can I:</p>

<ul>
<li>either: make sure that I have <code>awscli</code> available to be called during lambda function execution?</li>
<li>or: construct a <code>aws s3 sync</code> call directly from python <code>awscli</code> library?</li>
</ul>