# APIGatewayEmulatorResource.WithAPIGatewayLambdaReference

- Module: [Aspire.Hosting.AWS](/reference/api/go/aspire.hosting.aws.md)
- Defined on: [APIGatewayEmulatorResource](/reference/api/go/aspire.hosting.aws/apigatewayemulatorresource.md)
- Version: `13.7.4`
- Kind: `method`

## Definition

```go
type APIGatewayEmulatorResource interface {
    // ... omitted for brevity
    WithAPIGatewayLambdaReference(
        lambda LambdaProjectResource,
        httpMethod Method,
        path string,
    ) APIGatewayEmulatorResource
}
```

## Signature

```go
WithAPIGatewayLambdaReference(
    lambda LambdaProjectResource,
    httpMethod Method,
    path string,
) APIGatewayEmulatorResource
```

## Parameters

- `lambda` ([`LambdaProjectResource`](/reference/api/go/aspire.hosting.aws/lambdaprojectresource.md))
- `httpMethod` ([`Method`](/reference/api/go/aspire.hosting.aws/method.md))
- `path` (`string`)

## Returns

[`APIGatewayEmulatorResource`](/reference/api/go/aspire.hosting.aws/apigatewayemulatorresource.md)

Returns a handle; failures surface later via `Err()`.

## Defined on

- [APIGatewayEmulatorResource](/reference/api/go/aspire.hosting.aws/apigatewayemulatorresource.md) -- `handle`
