Skip to content

Update README.md #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Aspire.Hosting.AWS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,18 +176,18 @@ var awsConfig = builder.AddAWSSDKConfig()
// Add an executable Lambda function
builder.AddAWSLambdaFunction<Projects.ExecutableLambdaFunction>(
"MyLambdaFunction",
handler: "ExecutableLambdaFunction")
lambdaHandler: "ExecutableLambdaFunction")
.WithReference(awsConfig);

// Add a class library Lambda function
builder.AddAWSLambdaFunction<Projects.ClassLibraryLambdaFunction>(
"MyLambdaFunction",
handler: "ClassLibraryLambdaFunction::ClassLibraryLambdaFunction.Function::FunctionHandler")
lambdaHandler: "ClassLibraryLambdaFunction::ClassLibraryLambdaFunction.Function::FunctionHandler")
.WithReference(awsConfig);

```

The handler parameter specifies the Lambda handler in different formats depending on the project type:
The lambdaHandler parameter specifies the Lambda handler in different formats depending on the project type:

- For executable projects: specify the assembly name.
- For class library projects: use the format `{assembly}::{type}::{method}`.
Expand Down Expand Up @@ -225,11 +225,11 @@ To add an API Gateaway emulator to your .NET Aspire AppHost, use the `AddAPIGate
// Add Lambda functions
var rootWebFunction = builder.AddAWSLambdaFunction<Projects.WebApiLambdaFunction>(
"RootLambdaFunction",
handler: "WebApiLambdaFunction");
lambdaHandler: "WebApiLambdaFunction");

var addFunction = builder.AddAWSLambdaFunction<Projects.WebAddLambdaFunction>(
"AddLambdaFunction",
handler: "WebAddLambdaFunction");
lambdaHandler: "WebAddLambdaFunction");

// Configure API Gateway emulator
builder.AddAPIGatewayEmulator("APIGatewayEmulator", APIGatewayType.HttpV2)
Expand Down
Loading