Search code examples
amazon-web-servicesamazon-kinesispulumi

how to create a custom AWS resource name?


I'm creating AWS Kinesis. When I create AWS resource with Pulumi, the resource is created with a unique name. Example:(mystream-263c353).

How can I create a custom simple name, which doesn't have to be unique? Example:(mystream)

Here's my code:

const stream = new aws.kinesis.Stream("mystream", {
    shardCount: 1
});

Solution

  • You can specify the full name explicitly in the arguments:

    const stream = new aws.kinesis.Stream("mystream", {
        name: "mystream",
        shardCount: 1
    });
    

    Note that now it's your responsibility to make sure the name is unique.