LoginSignup
0
0

More than 1 year has passed since last update.

VPCフローログ調査Athena

Posted at
  • DATABASE作成
  • TABLE作成
  • PARTITION作成
    後、以下
SELECT
  from_unixtime(starttime, 9, 0) AS starttime_jst,
  from_unixtime(endtime, 9, 0) AS endtime_jst,
  interfaceid,
  sourceaddress,
  destinationaddress,
  sourceport,
  destinationport,
  protocol,
  numpackets,
  numbytes,
  action,
  logstatus,
  sublocationtype
FROM <DATABASE>.<TABLE>
WHERE <PARTITION>
AND (sourceaddress = '<IP>' OR sourceaddress = '<IP>') 
AND destinationaddress = '<IP>'
AND from_unixtime(starttime, 9, 0) >= cast('2099-12-31 12:12:12 +09:00' as timestamp with time zone)
AND from_unixtime(starttime, 9, 0) <  cast('2099-12-31 12:12:12 +09:00' as timestamp with time zone)
ORDER BY starttime;
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0