1. Managed Kafka streaming with AWS Kinesis

    Python

    Given your goal, the ideal resource to use will be aws.kinesis.Stream, as it is the Pulumi resource specifically designed for managing AWS Kinesis Data Streams.

    Here is a description of your program. This Pulumi program will create and manage an AWS Kinesis stream named 'kafka-stream'.

    Links to the resources used in the Pulumi Registry:

    aws.kinesis.Stream

    The Python program that accomplishes your goal is as follows:

    import pulumi from pulumi_aws import kinesis # Create a new Kinesis Stream kafka_stream = kinesis.Stream('kafkaStream', name="kafka-stream", retention_period=24, shard_count=1, encryption_type="KMS", kms_key_id="alias/aws/kinesis" ) # Export the name of the stream pulumi.export('kafka_stream', kafka_stream.name)

    Please replace the kms_key_id with your own value if you are not using the default AWS managed key.

    This program creates a Kinesis stream with a 24-hour data retention period and a single shard. It uses Key Management Service (KMS) for server-side encryption. The name of the Kinesis stream is exported as 'kafka_stream'.