# WithAPIGatewayLambdaReference

- Module: [Aspire.Hosting.AWS](/reference/api/go/aspire.hosting.aws.md)
- Version: `13.7.4`
- Kind: `method`
- Defined on: [`APIGatewayEmulatorResource`](/reference/api/go/aspire.hosting.aws/apigatewayemulatorresource.md)
- Source: [GitHub](https://github.com/aws/integrations-on-dotnet-aspire-for-aws)

## Definition

```go
func (APIGatewayEmulatorResource) 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()`.

## Applies to

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