Amazon Elastic Compute Cloud

2021/04/01 - Amazon Elastic Compute Cloud - 1 new api methods

Changes  VPC Flow Logs Service adds a new API, GetFlowLogsIntegrationTemplate, which generates CloudFormation templates for Athena. For more info, see https://docs.aws.amazon.com/console/vpc/flow-logs/athena

GetFlowLogsIntegrationTemplate (new) Link ΒΆ

Generates a CloudFormation template that streamlines and automates the integration of VPC flow logs with Amazon Athena. This make it easier for you to query and gain insights from VPC flow logs data. Based on the information that you provide, we configure resources in the template to do the following:

  • Create a table in Athena that maps fields to a custom log format

  • Create a Lambda function that updates the table with new partitions on a daily, weekly, or monthly basis

  • Create a table partitioned between two timestamps in the past

  • Create a set of named queries in Athena that you can use to get started quickly

See also: AWS API Documentation

Request Syntax

client.get_flow_logs_integration_template(
    DryRun=True|False,
    FlowLogId='string',
    ConfigDeliveryS3DestinationArn='string',
    IntegrateServices={
        'AthenaIntegrations': [
            {
                'IntegrationResultS3DestinationArn': 'string',
                'PartitionLoadFrequency': 'none'|'daily'|'weekly'|'monthly',
                'PartitionStartDate': datetime(2015, 1, 1),
                'PartitionEndDate': datetime(2015, 1, 1)
            },
        ]
    }
)
type DryRun

boolean

param DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

type FlowLogId

string

param FlowLogId

[REQUIRED]

The ID of the flow log.

type ConfigDeliveryS3DestinationArn

string

param ConfigDeliveryS3DestinationArn

[REQUIRED]

To store the CloudFormation template in Amazon S3, specify the location in Amazon S3.

type IntegrateServices

dict

param IntegrateServices

[REQUIRED]

Information about the service integration.

  • AthenaIntegrations (list) --

    Information about the integration with Amazon Athena.

    • (dict) --

      Describes integration options for Amazon Athena.

      • IntegrationResultS3DestinationArn (string) -- [REQUIRED]

        The location in Amazon S3 to store the generated CloudFormation template.

      • PartitionLoadFrequency (string) -- [REQUIRED]

        The schedule for adding new partitions to the table.

      • PartitionStartDate (datetime) --

        The start date for the partition.

      • PartitionEndDate (datetime) --

        The end date for the partition.

rtype

dict

returns

Response Syntax

{
    'Result': 'string'
}

Response Structure

  • (dict) --

    • Result (string) --

      The generated CloudFormation template.