擅长:python、mysql、java
<p>试试这个:</p>
<pre><code>import datetime
date_filter = (datetime.datetime.now() - datetime.timedelta(days=7)).strftime("%Y-%m-%d")
ec2_client.describe_instances(
Filters=[
{
'Name':'launch-time',
'Values':[date_filter+'*']
},
],
)
</code></pre>