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

Represents the service source from ECR Public.

Extends: Source › EcrPublicSource

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

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as apprunner_alpha from '@aws-cdk/aws-apprunner-alpha';

declare const secret: apprunner_alpha.Secret;
const ecrPublicSource = new apprunner_alpha.EcrPublicSource({
  imageIdentifier: 'imageIdentifier',

  // the properties below are optional
  imageConfiguration: {
    environment: {
      environmentKey: 'environment',
    },
    environmentSecrets: {
      environmentSecretsKey: secret,
    },
    environmentVariables: {
      environmentVariablesKey: 'environmentVariables',
    },
    port: 123,
    startCommand: 'startCommand',
  },
});
```

## Initializer

```ts
new EcrPublicSource(props: EcrPublicProps)
```

## 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 // chainable` (static) — Source from the ECR Public repository.

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