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

Represents the App Runner service source.

Extends: Source
Superclass of: AssetSource, EcrPublicSource, EcrSource, GithubSource

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/service.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts#L415)

## Example

```ts
import * as iam from 'aws-cdk-lib/aws-iam';

const service = new apprunner.Service(this, 'Service', {
  source: apprunner.Source.fromEcrPublic({
    imageConfiguration: { port: 8000 },
    imageIdentifier: 'public.ecr.aws/aws-containers/hello-app-runner:latest',
  }),
});

service.addToRolePolicy(new iam.PolicyStatement({
  effect: iam.Effect.ALLOW,
  actions: ['s3:GetObject'],
  resources: ['*'],
}))
```

## Initializer

```ts
new Source()
```

## Methods

- `bind(scope: Construct): SourceConfig` — Called when the Job is initialized to allow this object to bind.

- `fromAsset(props: AssetProps): AssetSource` (static) — Source from local assets.

- `fromEcr(props: EcrProps): EcrSource` (static) — Source from the ECR repository.

- `fromEcrPublic(props: EcrPublicProps): EcrPublicSource` (static) — Source from the ECR Public repository.

- `fromGitHub(props: GithubRepositoryProps): GithubSource` (static) — Source from the GitHub repository.
