> **Experimental**
>
> `@aws-cdk/aws-medialive-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# InputSource

A source for a pull-type input.

Use the static factory methods to create.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/input.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0-alpha.0/packages/@aws-cdk/aws-medialive-alpha/lib/input.ts#L180)

## Example

```ts
declare const stack: Stack;
declare const bucket: s3.IBucket;

new medialive.Input(stack, 'FileInput', {
  inputName: 'mp4-file',
  input: medialive.InputConfiguration.mp4File([
    medialive.InputSource.fromBucket(bucket, 'media/input.mp4'),
  ]),
});
```

## Initializer

```ts
new InputSource()
```

## Methods

- `fromBucket(bucket: IBucket, key: string): InputSource // chainable` (static) — Create a source from an S3 bucket.

  Automatically grants read access
  to the channel's role.

  **Parameters**

  - `bucket` — The S3 bucket containing the source file.
  - `key` — The object key within the bucket (e.g. 'videos/intro.mp4').

- `url(url: string, options?: InputSourceOptions): InputSource // chainable` (static) — Create a source from a URL.

  **Parameters**

  - `url` — The URL where MediaLive pulls the source content from.
  - `options` — Optional credentials.
