Skip to content

Commit 50bc401

Browse files
committed
cleanup
1 parent 25544b6 commit 50bc401

File tree

2 files changed

+8
-19
lines changed

2 files changed

+8
-19
lines changed

sample-apps/blank/README.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,43 +46,34 @@ Run `deploy.sh` to deploy the application.
4646
Successfully packaged artifacts and wrote output template to file out.yaml.
4747
Waiting for changeset to be created..
4848
Waiting for stack create/update to complete
49-
Successfully created/updated stack - lambda-blank
49+
Successfully created/updated stack - blank
5050

5151
This script uses AWS CloudFormation to deploy the Lambda functions and an IAM role. If the AWS CloudFormation stack that contains the resources already exists, the script updates it with any changes to the template or function code.
5252

5353
# Test
54-
To generate logs and errors, invoke the function.
54+
Invoke the function.
5555

5656
blank$ ./invoke.sh
5757
{
5858
"StatusCode": 200,
5959
"ExecutedVersion": "$LATEST"
6060
}
61-
{
62-
"StatusCode": 200,
63-
"FunctionError": "Handled",
64-
"ExecutedVersion": "$LATEST"
65-
}
66-
{
67-
"StatusCode": 200,
68-
"ExecutedVersion": "$LATEST"
69-
}
7061

7162
The functions in this application are instrumented with AWS X-Ray. Open the [X-Ray console](https://console.aws.amazon.com/xray/home#/service-map) to view the service map. The following service map shows the random error function generating errors for some requests. It also shows the processor function calling X-Ray, CloudWatch Logs, and Amazon S3.
7263

73-
![Service Map](/sample-apps/blank/images/errorprocessor-servicemap.png)
64+
![Service Map](/sample-apps/blank/images/blank-servicemap.png)
7465

7566
Choose a node in the main function graph. Then choose **View traces** to see a list of traces. Choose any trace to view a timeline that breaks down the work done by the function.
7667

77-
![Trace](/sample-apps/blank/images/errorprocessor-trace.png)
68+
![Trace](/sample-apps/blank/images/blank-trace.png)
7869

7970
Finally, view the application in the Lambda console.
8071

8172
*To view the output*
8273
1. Open the [applications page](https://console.aws.amazon.com/lambda/home#/applications) in the Lambda console.
83-
2. Choose **lambda-blank**.
74+
2. Choose **blank**.
8475

85-
![Application](/sample-apps/blank/images/errorprocessor-application.png)
76+
![Application](/sample-apps/blank/images/blank-application.png)
8677

8778
# Cleanup
8879
To delete the application, run the cleanup script.

sample-apps/ec2-spot/src/ec2spot/Function.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,19 @@ namespace ec2spot
1717
public class Function
1818
{
1919
private static AmazonEC2Client ec2Client;
20-
private static string region;
2120

2221
static Function() {
2322
AWSSDKHandler.RegisterXRayForAllServices();
2423
ec2Client = new AmazonEC2Client();
25-
Console.WriteLine(region);
2624
}
2725

2826
public async Task<string> FunctionHandler(Dictionary<string, string> input, ILambdaContext context)
2927
{
30-
// More AMI IDs https://aws.amazon.com/amazon-linux-2/release-notes/
28+
// More AMI IDs: aws.amazon.com/amazon-linux-2/release-notes/
3129
// us-east-2 HVM EBS-Backed 64-bit Amazon Linux 2
3230
string ami = "ami-09d9edae5eb90d556";
3331
string sg = "default";
34-
// https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/EC2/TInstanceType.html
32+
// docs.aws.amazon.com/sdkfornet/v3/apidocs/items/EC2/TInstanceType.html
3533
InstanceType type = InstanceType.T3aNano;
3634
string price = "0.003";
3735
int count = 1;

0 commit comments

Comments
 (0)