Skip to content

AWS App Runner configured with X-Ray in both Public and VPC scenarios

License

Notifications You must be signed in to change notification settings

epomatti/aws-apprunner-xray

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS App Runner with X-Ray

Two scenarios are provided:

  • Public
  • Public with VPC Connector

Create the ECR and other modules:

terraform -chdir="infra" init
terraform -chdir="infra" apply -auto-approve

Now, build and push the Java application to ECR:

(cd ./apps/java; bash ./ecrBuildPush.sh)

Create the .auto.tfvars file:

touch infra/.auto.tfvars

Set the instance type:

# Choose one
app_runner_workload = "PUBLIC"
app_runner_workload = "PUBLIC_WITH_VPC"

Apply again to create the App Runner instance:

terraform -chdir="infra" apply -auto-approve

Actuator

Testing the Java service:

curl https://<service-id>.us-east-2.awsapprunner.com/actuator/health

Local development

Build and run the image:

docker build -t javaapp-local .
docker run --rm -p 8080:8080 -e OBSERVABILITY_ENABLED=1 -e XRAY_LOGGING_LEVEL=INFO -e OTEL_JAVAAGENT_DEBUG=false -t javaapp-local

Clean-up

Destroy the resources when done:

terraform -chdir="infra" destroy -auto-approve

About

AWS App Runner configured with X-Ray in both Public and VPC scenarios

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published