You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The directory contains the source code and the Infrastructure as Code (IaC) to create the sample app in your AWS account.
4
+
5
+
### Prerequisite
6
+
Before you begin, ensure you have the following installed:
7
+
- Java 17
8
+
- Gradle
9
+
- Terraform
10
+
- AWS CLI configured with appropriate credentials
11
+
12
+
### Getting Started
13
+
14
+
#### 1. Build the application
15
+
```bash
16
+
# Change to the project directory
17
+
cd sample-apps/apigateway-lambda
18
+
19
+
# Build the application using Gradle
20
+
gradle clean build
21
+
22
+
# Prepare the Lambda deployment package
23
+
gradle createLambdaZip
24
+
```
25
+
26
+
#### 2. Deploy the application
27
+
```bash
28
+
# Change to the terraform directory
29
+
cd terraform
30
+
31
+
# Initialize Terraform
32
+
terraform init
33
+
34
+
# (Optional) Review the deployment plan for better understanding of the components
35
+
terraform plan
36
+
37
+
# Deploy
38
+
terraform apply
39
+
```
40
+
41
+
#### 3. Testing the applicating
42
+
After successful deployment, Terraform will output the API Gateway endpoint URL. You can test the application using:
43
+
```bash
44
+
curl <API_Gateway_URL>
45
+
```
46
+
47
+
#### 4. Clean Up
48
+
To avoid incurring unnecessary charges, remember to destroy the resources when you are done:
49
+
```bash
50
+
terraform destroy
51
+
```
52
+
53
+
#### (Optional) Instrumenting with Application Signals Lambda Layer
54
+
You can choose to instrument the Lambda function with Application Signals Lambda Layer upon deployment by passing in the layer ARN to the `adot_layer_arn` variable.
55
+
You must have the layer already published to your account before executing the following command.
0 commit comments