How to Configure Grafana Agent AWS Request Signing
In the sprawling, dynamic landscapes of modern cloud infrastructure, the ability to monitor and observe the health and performance of systems is not merely a convenience, but an absolute imperative. As organizations increasingly leverage Amazon Web Services (AWS) for their foundational computing needs, the tools and methodologies for collecting crucial telemetry data – metrics, logs, and traces – become paramount. Among the array of robust solutions available, Grafana Agent stands out as a lightweight, flexible, and highly efficient data collector, capable of seamlessly integrating with a multitude of data sources and observability platforms. However, merely deploying a monitoring agent is insufficient; ensuring the secure interaction between the agent and AWS services is a foundational requirement, preventing unauthorized access and safeguarding sensitive operational data. This is precisely where AWS Request Signing, specifically Signature Version 4 (SigV4), plays a pivotal role, acting as the cryptographic handshake that validates every interaction.
This extensive guide will take you on a deep dive into the intricacies of configuring Grafana Agent to securely interact with various AWS services using SigV4. We'll unravel the fundamental concepts of AWS Request Signing, elucidate the essential prerequisites, and walk you through detailed, practical configuration steps across different deployment scenarios. From the nuances of IAM roles to the considerations of environment variables and shared credential files, we will cover every facet necessary to establish a robust and secure observability pipeline. Beyond the technical specifics, we will also explore best practices for security, delve into common troubleshooting scenarios, and contextualize Grafana Agent's secure api interactions within the broader ecosystem of api management and cloud security. Ultimately, our goal is to empower you with the knowledge and confidence to build an observability stack that is not only performant and insightful but also uncompromisingly secure, underpinning the stability and reliability of your entire cloud operation. Understanding how to manage these critical api access points is as vital as understanding the data they collect, forming a secure gateway for your cloud telemetry.
Understanding Grafana Agent and the Mechanics of AWS Interaction
Before we delve into the specifics of secure configuration, it's essential to build a solid foundational understanding of what Grafana Agent is, how it typically interacts with AWS services, and the inherent security mechanisms that govern these interactions. This section will lay the groundwork, ensuring that subsequent discussions on request signing are understood within the appropriate architectural context.
1.1 What is Grafana Agent? A Lightweight Observability Sidekick
Grafana Agent is an open-source, vendor-agnostic telemetric collector designed to simplify the collection of metrics, logs, traces, and profiles. Developed by Grafana Labs, it's essentially a streamlined, purpose-built agent that can run on virtually any infrastructure – bare-metal servers, virtual machines, Kubernetes clusters, or even serverless environments – acting as the on-the-ground data gatherer for your observability stack. Unlike monolithic agents that might come bundled with extensive features, Grafana Agent is built with a modular and component-driven architecture, making it highly configurable and resource-efficient. You can enable only the components you need, whether it's scraping Prometheus metrics, collecting logs with Promtail's loki.source.kubernetes or loki.source.file components, or sending traces via OpenTelemetry Protocol (OTLP).
Its primary advantages include its small footprint, its ability to run as a single binary, and its seamless integration with the Grafana ecosystem, particularly Grafana Cloud, Prometheus, Loki, and Tempo. This allows it to act as a unified agent for various telemetry signals, simplifying deployment and management compared to maintaining separate agents for each data type. The agent's configuration is typically managed via a YAML file, agent.yaml, which defines its components, their individual configurations, and how they should process and forward collected data to remote endpoints. This flexibility makes it a powerful tool for extending your observability reach deep into your AWS infrastructure, capturing everything from EC2 instance metrics to application logs and distributed traces, all while minimizing operational overhead. It truly acts as a conduit, securely funneling critical information through specific api calls.
1.2 The Landscape of AWS Service Access: Beyond the Console
Interacting with AWS services is fundamental to operating in the cloud. While the AWS Management Console provides a user-friendly graphical interface, programmatic access is the backbone of automation, integration, and, indeed, observability. Applications, scripts, command-line tools, and agents like Grafana Agent rarely use the console; instead, they communicate directly with AWS service api endpoints. These api endpoints are the gateways to AWS's vast suite of services, from S3 for storage to CloudWatch for monitoring, EC2 for compute, and DynamoDB for databases.
Every programmatic interaction with an AWS service api endpoint requires proper authentication and authorization. AWS's Identity and Access Management (IAM) service is the cornerstone of this security model. IAM allows you to define who (or what) can access which AWS resources and under what conditions. When an application, such as Grafana Agent, attempts to make an api call to an AWS service, it must present credentials that verify its identity and establish its permissions. These credentials can take various forms: long-lived access key IDs and secret access keys, temporary security credentials obtained through roles, or session tokens. Without robust authentication, any entity could potentially interact with your AWS resources, leading to severe security breaches, data compromise, or unauthorized resource manipulation. Therefore, securing every api interaction is not just a best practice but a critical operational necessity, making the api a key security boundary.
1.3 The Indispensable Role of AWS Request Signing (Signature Version 4)
At the heart of secure programmatic interaction with AWS lies AWS Signature Version 4 (SigV4). SigV4 is the cryptographic protocol AWS uses to authenticate requests made to its services. It's a sophisticated mechanism designed to ensure the integrity and authenticity of every api call, protecting against various threats, including impersonation, data tampering, and replay attacks. Essentially, SigV4 ensures two critical aspects:
- Authentication: It verifies the identity of the entity making the request. AWS needs to know who is sending the
apicall. - Integrity: It ensures that the request has not been tampered with in transit. AWS needs to know that the
apicall it received is exactly the one that was sent.
The SigV4 process involves several steps, all performed programmatically by the AWS SDKs or, in our case, by Grafana Agent's underlying AWS SDK components. When an application sends a request to an AWS service, it doesn't just send its credentials plainly. Instead, it uses its secret access key (or temporary credentials) to create a cryptographic signature of the entire request. This signature is then included in the request headers. The signing process involves:
- Canonical Request Creation: Normalizing various parts of the HTTP request (method, URI, headers, body) into a standardized format.
- String to Sign Creation: Combining the canonical request with other metadata like algorithm, credential scope (date, region, service), and a hash of the canonical request.
- Signing Key Derivation: Generating a unique signing key for the request using a series of HMAC-SHA256 operations based on the secret access key, date, region, and service.
- Signature Calculation: Using the derived signing key to compute an HMAC-SHA256 signature of the "string to sign."
- Adding Signature to Request: Embedding the computed signature in the
Authorizationheader of the HTTP request.
When the AWS service endpoint receives the request, it performs the exact same signing process using the provided access key ID to retrieve the corresponding secret access key (or validate the temporary credentials). If the signature computed by the AWS service matches the signature provided in the request, the request is authenticated, and the service can then proceed with authorization checks based on the IAM policy associated with the credentials. This intricate cryptographic dance happens transparently for developers using AWS SDKs, but for tools like Grafana Agent, understanding that this secure api handshake is occurring under the hood is vital for troubleshooting and proper configuration. The robustness of SigV4 effectively turns every api endpoint into a secure gateway that demands cryptographic proof of identity and integrity.
Prerequisites for Enabling AWS Request Signing in Grafana Agent
Successfully configuring Grafana Agent to use AWS Request Signing requires careful preparation of your AWS environment and a basic setup of the agent itself. This section outlines the essential prerequisites you must address before diving into the agent's specific configuration.
2.1 AWS IAM Configuration: The Foundation of Permissions
AWS Identity and Access Management (IAM) is the single most critical component for securing your AWS resources. Before Grafana Agent can interact with any AWS service, it needs an identity and a set of permissions. Adhering to the principle of least privilege – granting only the permissions absolutely necessary to perform a task – is paramount here.
Creating IAM Policies
The first step is to define an IAM policy that specifies what Grafana Agent is allowed to do. For monitoring purposes, this typically involves read-only access to specific AWS services. For example, if Grafana Agent needs to scrape metrics from CloudWatch and send logs to CloudWatch Logs, its policy might include actions like cloudwatch:ListMetrics, cloudwatch:GetMetricData, logs:DescribeLogGroups, and logs:FilterLogEvents.
Here's an example of an IAM policy designed for a Grafana Agent collecting metrics and logs:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"cloudwatch:ListMetrics",
"cloudwatch:GetMetricData",
"cloudwatch:GetMetricStatistics",
"ec2:DescribeInstances",
"ecs:ListClusters",
"ecs:DescribeClusters",
"ecs:ListServices",
"ecs:DescribeServices",
"s3:ListAllMyBuckets",
"s3:GetBucketLocation",
"logs:DescribeLogGroups",
"logs:FilterLogEvents",
"logs:GetLogEvents"
],
"Resource": "*"
}
]
}
cloudwatch:*actions: Grant permission to retrieve various CloudWatch metrics, which is crucial for scraping data from services like EC2, EBS, RDS, etc.ec2:DescribeInstances: Allows the agent to discover EC2 instances, useful if you're using auto-discovery features for metrics scraping. SimilarDescribeactions might be needed for other services if you intend to scrape their metrics or logs.s3:ListAllMyBuckets,s3:GetBucketLocation: These might be needed if your Grafana Agent component needs to interact with S3, for example, for as3_bucket_sizeexporter or similar. While not always directly related to standard observability, it exemplifies permissions needed for specific S3apiinteractions.logs:*actions: Provide access to read and filter logs from CloudWatch Logs, enabling log collection.
Always customize this policy to your exact needs. Avoid using * for actions unless absolutely necessary and restrict Resource whenever possible, moving beyond the simple wildcard for robust security.
Creating IAM Roles (Recommended for Cloud Deployments)
For Grafana Agent running on AWS EC2 instances, within an Amazon Elastic Kubernetes Service (EKS) cluster, or on AWS Fargate, the most secure and recommended way to provide credentials is by using IAM roles. IAM roles eliminate the need to distribute or manage long-lived access keys directly on your instances or containers, significantly reducing the risk of credential compromise.
- For EC2 Instances: You create an IAM role, attach your custom policy to it, and then associate this role with your EC2 instance profile when you launch or modify the instance. Grafana Agent (or any application on the instance) can then automatically assume this role and obtain temporary credentials from the EC2 instance metadata service, which are rotated regularly by AWS. This automatic rotation drastically improves security compared to static access keys.
- For EKS Clusters (Kubernetes): AWS offers IAM Roles for Service Accounts (IRSA). This mechanism allows you to associate an IAM role directly with a Kubernetes service account. When your Grafana Agent pod uses that service account, it assumes the associated IAM role and obtains temporary credentials, again avoiding the need for static keys. This is the gold standard for secure credential management in EKS.
- For Fargate Tasks: Similar to EC2, Fargate tasks can be launched with a task IAM role, which provides credentials to the containers running within the task.
Steps to Create an IAM Role for EC2 (example):
- Navigate to the IAM console.
- Choose "Roles" from the left navigation pane and click "Create role."
- Select "AWS service" as the trusted entity, then choose "EC2" as the use case. This allows EC2 instances to assume this role.
- Click "Next."
- Search for and attach the custom policy you created (e.g.,
GrafanaAgentCloudWatchPolicy). - Click "Next."
- Give the role a meaningful name (e.g.,
GrafanaAgentEC2Role) and an optional description. - Review and create the role.
Once the role is created, ensure your EC2 instances where Grafana Agent will run are launched with or modified to use this IAM role in their instance profile.
2.2 Grafana Agent Installation and Basic Setup
Before configuring AWS Request Signing, you need a functioning Grafana Agent installation. Grafana Agent can be deployed in various ways:
- Standalone Binary: Download the appropriate binary for your operating system (Linux, Windows, macOS) from the Grafana Agent releases page. This is common for VMs or bare-metal servers.
- Docker Container: Pull the official Grafana Agent Docker image. Ideal for containerized environments.
- Helm Chart (for Kubernetes): Use the official Helm chart for seamless deployment and management within Kubernetes clusters.
Regardless of the deployment method, you'll need a basic agent.yaml configuration file. This file defines the agent's components and their initial setup. A minimal agent.yaml might look something like this, primarily setting up a metrics and logs section and a remote write endpoint:
# agent.yaml
server:
http_listen_port: 12345
grpc_listen_port: 12346
metrics:
configs:
- name: default
remote_write:
- url: <YOUR_REMOTE_WRITE_ENDPOINT_FOR_METRICS> # e.g., Grafana Cloud Prometheus remote write endpoint
basic_auth:
username: <YOUR_GRAFANA_CLOUD_USERNAME>
password: <YOUR_GRAFANA_CLOUD_PROMETHEUS_API_KEY>
logs:
configs:
- name: default
clients:
- url: <YOUR_REMOTE_WRITE_ENDPOINT_FOR_LOGS> # e.g., Grafana Cloud Loki remote write endpoint
basic_auth:
username: <YOUR_GRAFANA_CLOUD_USERNAME>
password: <YOUR_GRAFANA_CLOUD_LOKI_API_KEY>
# More components will be added here for AWS integrations
This basic setup ensures the agent is running and can connect to its designated remote write endpoints. The next step is to configure it to collect data from AWS services securely.
2.3 Understanding Credential Providers for Grafana Agent
Grafana Agent, leveraging the underlying AWS SDK, has a sophisticated mechanism for resolving AWS credentials. It checks for credentials in a specific order, which is crucial to understand for proper configuration and troubleshooting:
- Environment Variables:
AWS_ACCESS_KEY_ID: Your AWS access key ID.AWS_SECRET_ACCESS_KEY: Your AWS secret access key.AWS_SESSION_TOKEN: (Optional) Required if you are using temporary security credentials (e.g., from an IAM role assumption).AWS_REGION: The default AWS region for requests.AWS_DEFAULT_REGION: Alias forAWS_REGION. This method is often used in development or CI/CD pipelines but should be handled with extreme care in production due to the risk of exposing credentials.
- Shared Credential File:
- Typically located at
~/.aws/credentials(on Linux/macOS) orC:\Users\USER_NAME\.aws\credentials(on Windows). - Contains profiles with
aws_access_key_idandaws_secret_access_key. - The
AWS_SHARED_CREDENTIALS_FILEenvironment variable can override the default location. - The
AWS_PROFILEenvironment variable can specify which profile to use from the file. This method is also less recommended for production servers due to the static nature of keys stored on disk.
- Typically located at
- AWS
configFile:- Located at
~/.aws/config. Can define default regions and profiles. - The
AWS_CONFIG_FILEenvironment variable can override the default location.
- Located at
- IAM Roles for EC2 Instances / Instance Metadata Service (IMS):
- When Grafana Agent runs on an EC2 instance, it can automatically retrieve temporary credentials from the EC2 Instance Metadata Service. This is the preferred method for EC2 deployments.
- For EKS with IRSA, the pod contacts an internal AWS endpoint to get credentials associated with its service account.
- ECS Container Credentials:
- For tasks running on Amazon ECS (both EC2 launch type and Fargate), containers can automatically receive temporary credentials through the ECS Task IAM role.
Understanding this precedence order is vital. For example, if you set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables, they will take precedence over an associated IAM role, which might not be your desired behavior for production security. For security and operational ease, using IAM roles is almost always the best approach for cloud-native deployments of Grafana Agent.
Configuring Grafana Agent for AWS Request Signing: Detailed Implementation
With the prerequisites in place, we can now dive into the specific configurations required within Grafana Agent to enable secure AWS Request Signing. Grafana Agent's modular design means that AWS interactions are handled by specific components, and the credential configuration will typically apply to these components.
3.1 Common Scenarios for AWS Request Signing in Grafana Agent
Grafana Agent's utility in AWS environments shines through its ability to collect data from various services. Here are some of the most common scenarios where AWS Request Signing becomes essential:
- Sending Metrics to CloudWatch: While Grafana Agent primarily pushes to remote write endpoints like Prometheus, it can also scrape metrics from CloudWatch itself or other AWS services. This involves making
apicalls to the CloudWatchapiendpoint (GetMetricData,ListMetrics). - Collecting Logs from CloudWatch Logs: The
loki.source.cloudwatch_logscomponent (or similar) needs to makeapicalls to the CloudWatch Logsapiendpoint (FilterLogEvents,GetLogEvents) to retrieve logs. - Scraping Metrics from AWS Services via Exporters: Many Grafana Agent integrations are essentially Prometheus exporters that connect to specific AWS services (e.g., S3, RDS, DynamoDB, ECS) to expose their metrics. These exporters often use the AWS SDK under the hood and thus require proper AWS credentials and SigV4 signing for their
apicalls. - Discovering Resources: Components that auto-discover instances (e.g.,
ec2_sd_configin Prometheus-style scraping) requireapiaccess (ec2:DescribeInstances) to list resources.
In each of these scenarios, Grafana Agent acts as a client making authenticated api requests to AWS endpoints, and AWS Request Signing ensures these requests are legitimate.
3.2 Configuration Methods for Providing Credentials to Grafana Agent
Grafana Agent, through its underlying AWS SDK integrations, generally follows the standard AWS credential chain. However, for clarity and specific agent components, you might explicitly configure regions or other parameters.
Method 1: Using IAM Roles (Recommended for EC2, EKS, Fargate)
This is the most secure and operationally sound method for production deployments on AWS. When an IAM role is associated with your Grafana Agent's host (EC2 instance, EKS Service Account, Fargate task), the agent automatically obtains temporary credentials without any explicit configuration in its agent.yaml file, provided the agent is running on an entity that has assumed the role.
How it works:
- EC2 Instance Profile: If your EC2 instance is launched with an IAM role, Grafana Agent, when running on that instance, will query the EC2 Instance Metadata Service (IMS) (e.g.,
http://169.254.169.254/latest/meta-data/iam/security-credentials/) to retrieve temporaryAWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY, andAWS_SESSION_TOKEN. - EKS with IRSA: For Kubernetes deployments on EKS, if you've configured IRSA for the Grafana Agent service account, the agent's pod will have an environment variable
AWS_WEB_IDENTITY_TOKEN_FILEpointing to a projected service account token. The AWS SDK then uses this token to assume the configured IAM role and retrieve temporary credentials. - Fargate Task Role: Similarly, Fargate tasks leverage the task role to provide credentials to containers.
Example Grafana Agent Configuration (No explicit credentials needed):
When using IAM roles, your Grafana Agent configuration for AWS-related components often looks cleaner, as you don't need to specify access_key_id or secret_access_key. You might only need to specify the region.
# agent.yaml - Example using IAM role for CloudWatch metrics scraping
metrics:
configs:
- name: default
remote_write:
- url: <YOUR_REMOTE_WRITE_ENDPOINT>
basic_auth:
username: <USERNAME>
password: <API_KEY>
scrape_configs:
- job_name: 'cloudwatch_ec2_metrics'
cloudwatch_exporter_configs:
- region: us-east-1 # Specify the region
metrics:
- aws_namespace: AWS/EC2
aws_metric_name: CPUUtilization
aws_dimensions: [InstanceId]
aws_statistics: [Average]
aws_period: 300
# No access_key_id or secret_access_key needed here
# if an IAM role is correctly configured on the host/pod
In this setup, the Grafana Agent will automatically use the credentials provided by the IAM role associated with its execution environment. This significantly reduces security risks by eliminating static credentials.
Method 2: Using Environment Variables
While less secure for long-lived production deployments, using environment variables is a common and straightforward method, especially for local testing, specific container deployments, or CI/CD pipelines where secrets are managed externally.
How it works: You set the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and optionally AWS_SESSION_TOKEN (for temporary credentials) and AWS_REGION in the environment where Grafana Agent runs.
Example for a Docker Container:
docker run -d \
-e AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" \
-e AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" \
-e AWS_REGION="us-east-1" \
-v /path/to/your/agent.yaml:/etc/agent/agent.yaml \
grafana/agent:latest --config.file=/etc/agent/agent.yaml
Security Considerations: Hardcoding secrets directly in scripts or container definitions is highly discouraged. Use secret management solutions like AWS Secrets Manager, HashiCorp Vault, or Kubernetes Secrets to inject these environment variables at runtime securely.
Method 3: Using a Shared Credential File
This method involves placing an AWS credentials file on the system where Grafana Agent runs. It's often used for local development, CLI tools, or specific server setups where IAM roles are not feasible (e.g., on-premises servers needing to reach AWS).
How it works:
- Create a file named
credentials(e.g., at~/.aws/credentialsor a custom path). - Inform Grafana Agent (or the AWS SDK) which profile to use, either by setting the
AWS_PROFILEenvironment variable or by explicitly configuring it within certain Grafana Agent components if they support it. If no profile is specified, it defaults to[default].
Optionally, you can also have a config file (~/.aws/config) to define regions or specific profile configurations.```ini
~/.aws/config
[default] region = us-east-1[profile grafana-agent-profile] region = us-west-2 ```
Populate it with your access key ID and secret access key, typically under a [default] profile or a named profile.```ini
~/.aws/credentials
[default] aws_access_key_id = AKIAIOSFODNN7EXAMPLE aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY[grafana-agent-profile] aws_access_key_id = ANOTHEREKEYEXAMPLE aws_secret_access_key = ANOTHERSECRETEXAMPLE ```
Security Concerns: Storing static credentials on disk carries risks. Ensure strict file permissions (chmod 600 ~/.aws/credentials) and consider encryption at rest if this method must be used in production.
3.3 Specific Grafana Agent Integrations Requiring AWS Signing
Let's look at practical agent.yaml examples for popular AWS integrations that require SigV4.
CloudWatch Metrics Scraper (cloudwatch_exporter_configs)
This component allows Grafana Agent to scrape metrics directly from AWS CloudWatch.
# agent.yaml - CloudWatch metrics scraping
metrics:
configs:
- name: default
remote_write:
- url: <YOUR_REMOTE_WRITE_ENDPOINT>
basic_auth:
username: <USERNAME>
password: <API_KEY>
scrape_configs:
- job_name: 'aws_ec2_metrics'
cloudwatch_exporter_configs:
- region: us-east-1
# If NOT using IAM roles, you would specify credentials here:
# access_key_id: ${AWS_ACCESS_KEY_ID} # Use environment variable for security
# secret_access_key: ${AWS_SECRET_ACCESS_KEY}
# If using a specific profile from ~/.aws/credentials:
# profile: grafana-agent-profile
metrics:
- aws_namespace: AWS/EC2
aws_metric_name: CPUUtilization
aws_dimensions: [InstanceId]
aws_statistics: [Average, Maximum]
aws_period: 300
# You can add resource tags for filtering if needed
# resource_tags:
# Name: my-app-server
- aws_namespace: AWS/EBS
aws_metric_name: VolumeReadBytes
aws_dimensions: [VolumeId]
aws_statistics: [Sum]
aws_period: 300
# Add more metrics as needed
Key Points: * region: Absolutely essential. Specifies which AWS region to query. * access_key_id, secret_access_key: These are optional and only used if an IAM role is not available or if you explicitly want to override. It's highly recommended to use environment variables (${VAR_NAME}) if you must specify them, rather than hardcoding. * profile: Specifies a named profile from your ~/.aws/credentials file.
CloudWatch Logs Component (loki.source.cloudwatch_logs)
This component collects logs from AWS CloudWatch Logs and forwards them to a Loki instance.
# agent.yaml - CloudWatch Logs collection
logs:
configs:
- name: default
clients:
- url: <YOUR_REMOTE_LOKI_ENDPOINT>
basic_auth:
username: <USERNAME>
password: <API_KEY>
integrations:
- loki_source_cloudwatch_logs:
name: cloudwatch_logs_integration
regions:
- us-east-1
- us-west-2 # You can specify multiple regions
log_groups:
- /aws/lambda/my-function
- /aws/ecs/my-service/* # Wildcards are supported
# If NOT using IAM roles, specify credentials here:
# access_key_id: ${AWS_ACCESS_KEY_ID}
# secret_access_key: ${AWS_SECRET_ACCESS_KEY}
# profile: grafana-agent-profile
label_drop: # Example to drop some labels
- "source_type"
forward_periods: 5m # How often to check for new logs
max_streams: 1000 # Max log streams to tail
Key Points: * regions: A list of AWS regions to monitor for CloudWatch Log Groups. * log_groups: A list of CloudWatch Log Group names or patterns to collect logs from. * Credential fields (access_key_id, secret_access_key, profile) work identically to the cloudwatch_exporter_configs and should be handled with the same security considerations (prefer IAM roles).
Other Exporters and Integrations
Many other Grafana Agent integrations or Prometheus exporters that you might run alongside Grafana Agent (or as part of it, if it's integrated) will interact with AWS services. Examples include:
s3_exporter: To get metrics about S3 buckets.rds_exporter: To get metrics about RDS instances.lambda_exporter: To monitor Lambda functions.
For these, the credential provisioning mechanisms remain consistent. If the component uses the AWS SDK, it will follow the standard credential chain. If it has explicit configuration fields for access_key_id and secret_access_key, treat them with the same security precautions.
3.4 Role of api in These Interactions and gateway for Broader Context
Every interaction Grafana Agent has with AWS, from listing EC2 instances to fetching CloudWatch metrics or filtering CloudWatch Logs, is fundamentally an api call. These api calls target specific AWS service api endpoints. AWS Request Signing (SigV4) is the mechanism that secures each and every one of these direct api interactions, ensuring that the request is authenticated and its integrity is preserved. Without SigV4, these api calls would be open to various security vulnerabilities. The proper configuration of Grafana Agent for AWS Request Signing therefore directly translates to the secure handling of thousands, if not millions, of individual api requests that form the backbone of your observability pipeline.
The concept of a secure gateway is vital here. In the context of AWS, the api endpoints themselves act as the gateway to their respective services, protected by SigV4. These endpoints enforce the security policies defined in IAM, ensuring that only authorized entities can pass through. This granular, per-request security for AWS services contrasts with, yet complements, the role of a more generalized api gateway.
While Grafana Agent is meticulously configured for secure direct api interactions with AWS services using SigV4, organizations managing their own suite of internal and external apis, especially those leveraging cutting-edge AI models, often benefit immensely from a dedicated api gateway platform. For instance, ApiPark, an open-source AI gateway and api management platform, offers comprehensive features for managing, securing, and deploying AI and REST services. It provides a centralized control point for api access, offering capabilities such as unified api formats for AI invocation, prompt encapsulation into REST APIs, end-to-end api lifecycle management, and robust access controls. APIPark handles authentication, authorization, rate limiting, and traffic routing for user-defined apis, ensuring that applications and microservices interact with AI models and custom backend services through a secure and managed gateway. This approach is similar in principle to how AWS secures its own service apis, but scaled for user-defined apis, creating a consistent and secure api ecosystem for developers and enterprises alike.
APIPark is a high-performance AI gateway that allows you to securely access the most comprehensive LLM APIs globally on the APIPark platform, including OpenAI, Anthropic, Mistral, Llama2, Google Gemini, and more.Try APIPark now! 👇👇👇
Advanced Configuration and Best Practices for Secure Grafana Agent Operation
Beyond the basic setup, maintaining a secure and efficient Grafana Agent deployment for AWS interactions requires adherence to best practices, proactive troubleshooting strategies, and consideration for scalability. This section will elaborate on these critical aspects.
4.1 Security Best Practices for AWS Request Signing
Securing Grafana Agent's access to AWS is not a one-time task but an ongoing commitment. Implementing the following best practices will significantly enhance the security posture of your observability stack:
- Principle of Least Privilege (PoLP): This is the golden rule of IAM. Always grant Grafana Agent (or any entity) only the minimum permissions necessary to perform its intended functions. For example, if the agent only needs to read CloudWatch metrics and logs, ensure its IAM policy only grants
GetMetricData,ListMetrics,FilterLogEvents, andDescribeLogGroupsactions, and avoid*wildcard permissions for actions or resources unless absolutely unavoidable for very specific, tightly controlled scenarios. Over-privileged roles are a major security vulnerability. - Prefer IAM Roles Over Static Credentials: For Grafana Agent deployments within AWS (EC2, EKS, Fargate), IAM roles are the undisputed champions of credential management. They provide temporary, automatically rotated credentials, eliminating the need to store static
access_key_idandsecret_access_keyon disk or as environment variables. This drastically reduces the attack surface for credential theft. - Rotate Access Keys Regularly (if using static credentials): If, due to specific constraints, you must use static
access_key_idandsecret_access_key(e.g., for Grafana Agent running outside AWS), implement a strict rotation policy. AWS recommends rotating access keys every 90 days or less. Automate this process using AWS CLI or SDK to minimize operational burden and human error. - Avoid Hardcoding Credentials: Never embed
access_key_idandsecret_access_keydirectly into youragent.yamlfiles, Dockerfiles, or shell scripts. Instead, leverage secure secret management services (like AWS Secrets Manager, HashiCorp Vault, Kubernetes Secrets) to inject credentials as environment variables at runtime. This centralizes secret management and prevents sensitive data from being committed to version control systems. - Monitor IAM Activity with CloudTrail: Enable AWS CloudTrail to log all
apicalls made to your AWS account. This provides an audit trail of who did what, when, and from where. Monitor CloudTrail logs for unusual IAM activity, such as attempts to assume roles from unexpected sources, repeated authentication failures, or changes to IAM policies, which could indicate a compromise. - Implement Network Segmentation: Ensure Grafana Agent is deployed within a secure network segment (e.g., a private subnet in a VPC) with appropriate Network ACLs and Security Groups. Restrict outbound network access to only the necessary AWS service endpoints (e.g., CloudWatch, CloudWatch Logs endpoints) and your remote write endpoints (Grafana Cloud, Prometheus, Loki).
- Time Synchronization: AWS SigV4 is highly time-sensitive. Ensure that the system running Grafana Agent has its clock accurately synchronized using NTP (Network Time Protocol). A significant time skew (typically more than 5 minutes) between the client and AWS servers will result in signature mismatch errors and rejected
apirequests. - Regularly Update Grafana Agent: Keep Grafana Agent updated to the latest stable version. Updates often include security patches, bug fixes, and performance improvements that are crucial for maintaining a robust and secure observability stack.
4.2 Troubleshooting Common Issues with AWS Request Signing
Despite careful configuration, issues can arise. Knowing how to diagnose and resolve common problems related to AWS Request Signing is invaluable.
- "Access Denied" or "UnauthorizedOperation" Errors:
- Symptom: Grafana Agent logs show messages indicating
Access Denied,UnauthorizedOperation, or similar permission-related errors when trying to interact with AWS services. - Diagnosis: This is almost always an IAM policy issue. The credentials Grafana Agent is using lack the necessary permissions for the specific
apiaction it's trying to perform on the specified resource. - Resolution:
- Check IAM Policy: Review the IAM policy attached to the role or user that Grafana Agent is using. Ensure it explicitly allows the
Action(e.g.,cloudwatch:GetMetricData,logs:FilterLogEvents) on theResource(*or specific ARN) that the agent is trying to access. - Verify Credential Provider: Confirm that Grafana Agent is picking up the correct credentials (e.g., the right IAM role, the correct environment variables, or the intended profile from the shared credential file). Review the precedence order of credential providers.
- Use IAM Policy Simulator: AWS IAM Policy Simulator is an excellent tool to test if a given IAM identity has permission for a specific action on a specific resource.
- Check IAM Policy: Review the IAM policy attached to the role or user that Grafana Agent is using. Ensure it explicitly allows the
- Symptom: Grafana Agent logs show messages indicating
- "SignatureDoesNotMatch" or "InvalidSignatureException":
- Symptom:
apicalls are consistently rejected with errors related to an invalid or unmatched signature. - Diagnosis: This points to a problem with the cryptographic signing process.
- Incorrect
secret_access_key: The most common cause is a mismatch between thesecret_access_keyused by Grafana Agent and the actual key known to AWS for the givenaccess_key_id. - Time Skew: SigV4 signatures are time-bound. If the system clock of the Grafana Agent host is significantly out of sync with AWS servers (usually >5 minutes), the signature will be deemed invalid.
- Invalid
session_token: If using temporary credentials (e.g., from an assumed role), an expired or incorrectAWS_SESSION_TOKENcan cause this.
- Incorrect
- Resolution:
- Verify Keys: Double-check your
AWS_SECRET_ACCESS_KEY(or the equivalent for your credential provider). Regenerate keys if necessary. - Sync Time: Ensure NTP is configured and working correctly on the host running Grafana Agent. Use
ntpq -p(Linux) or check system time settings. - Check Session Token: If manually providing temporary credentials, ensure the
AWS_SESSION_TOKENis current and correctly set.
- Verify Keys: Double-check your
- Symptom:
- "The security token included in the request is invalid":
- Symptom: Often accompanies "SignatureDoesNotMatch" or can appear independently.
- Diagnosis: Typically indicates an issue with temporary credentials (
AWS_SESSION_TOKEN). The token might be expired, malformed, or associated with a revoked session. - Resolution: If using IAM roles, ensure the role assumption process is healthy. If manually setting temporary credentials, verify their validity period and regeneration mechanism.
- Incorrect Region or Service Endpoint:
- Symptom:
apicalls fail with errors likeInvalidRegionorNoSuchBucket(if region-specific). - Diagnosis: Grafana Agent might be trying to access a service in a region where it doesn't exist, or its configured region doesn't match the resource's region.
- Resolution: Verify the
regionconfiguration in youragent.yamlfor each AWS component. For S3, ensure bucket location matches the region you're querying, or query the correct region first.
- Symptom:
- Grafana Agent Logs: Always start your troubleshooting by examining the Grafana Agent logs. Increase log verbosity if needed (
-log.level=debug) to get more detailed insights into theapicalls being made and any errors received from AWS.
4.3 Scalability and High Availability Considerations
For production deployments, planning for scalability and high availability of Grafana Agent is crucial, especially when it's interacting with AWS services.
- Cluster Deployment: Deploy Grafana Agent in a clustered fashion (e.g., across multiple EC2 instances, or as a DaemonSet/Deployment in Kubernetes). This ensures that if one agent instance fails, others can continue collecting data, preventing monitoring gaps.
- Auto-Scaling: Leverage AWS Auto Scaling Groups for EC2 instances running Grafana Agent. This allows you to automatically adjust the number of agent instances based on demand (e.g., number of monitored resources, volume of logs) and ensure resilience.
- Load Balancing: If you're running multiple Grafana Agents, you might need to consider how they distribute the load of scraping or collecting data. For Prometheus-style scraping, service discovery mechanisms help. For logs, components like
loki.source.cloudwatch_logsmight manage stream distribution. - AWS
apiThrottling: Be mindful of AWSapirate limits. If Grafana Agent makes too manyapicalls too quickly, AWS might throttle your requests. Configure appropriatescrape_intervalandforward_periodsto avoid excessiveapicalls. In some Grafana Agent components, you might find parameters to control concurrency or backoff strategies. Monitor AWS CloudWatchAPI_CALLSmetrics for potential throttling. - Regional Distribution: For multi-region AWS deployments, consider deploying Grafana Agent instances in each region to minimize latency and ensure region-specific data collection is efficient. Each regional agent would then forward data to a centralized or regional remote write endpoint.
4.4 Monitoring Grafana Agent's Performance and Health
Finally, an often-overlooked best practice is to monitor the Grafana Agent itself. This helps ensure it's functioning correctly and securely.
- Agent Internal Metrics: Grafana Agent exposes its own internal metrics (e.g., on
http_listen_port/metrics endpoint) in Prometheus format. Scrape these metrics with another Grafana Agent or a dedicated Prometheus instance. This allows you to monitor:agent_build_info: Version and build details.agent_component_healthy: Health status of individual components.agent_component_runs_total: Number of times components have run.agent_http_requests_total: HTTP request counts, useful for observing traffic to its API.agent_remote_write_queue_pending_samples: Shows if the remote write queue is backing up.
- AWS
apiCall Metrics: Monitor CloudWatch metrics related to AWSapicalls. For example, for CloudWatch Logs, look atGetLogEventsorFilterLogEventscall counts and latency. Sudden drops or spikes might indicate issues with Grafana Agent's interaction with AWS. - Logging and Alerting: Configure alerts based on Grafana Agent's internal metrics (e.g., if a component becomes unhealthy) or on AWS
apicall failures. Integrate Grafana Agent's own logs into your centralized logging solution (like Loki) for easy access and analysis during troubleshooting.
The Broader Context of API Security and Management
While securing Grafana Agent's direct api interactions with AWS services is a specific and critical task, it exists within a larger, evolving landscape of api security and management. Understanding this broader context helps in appreciating the significance of robust authentication mechanisms like SigV4 and the role of specialized api gateway solutions.
5.1 The Evolution of API Security
The journey of api security has been one of continuous adaptation and increasing sophistication. In the early days, simple basic authentication or api keys might have sufficed. However, as apis became the primary interface for applications, services, and data exchange – both internally and externally – the need for more stringent security measures became paramount. Today, apis are under constant attack, making comprehensive security non-negotiable.
Mechanisms like OAuth 2.0, OpenID Connect, mTLS (mutual TLS), and cryptographic signing protocols like AWS SigV4 represent this evolution. They move beyond simple credential validation to encompass identity verification, granular authorization, message integrity, and protection against various forms of spoofing and tampering. This evolution is driven by the increasing complexity of distributed systems, the proliferation of microservices, and the ever-present threat landscape. Every api endpoint, whether for an internal service or a public-facing product, must be treated as a potential vulnerability if not properly secured. The gateway to your digital assets is only as strong as its weakest api.
5.2 The Crucial Role of API Gateways
In distributed architectures, especially those leveraging microservices, managing individual apis for authentication, authorization, rate limiting, and traffic routing can quickly become unwieldy. This is where api gateway solutions step in, acting as a central entry point for all client requests. An api gateway essentially serves as a single, powerful gateway that intercepts and processes api calls before forwarding them to the appropriate backend services.
Key functions of an api gateway:
- Authentication and Authorization: Centralizing identity verification, often integrating with identity providers.
- Traffic Management: Implementing rate limiting, throttling, caching, and load balancing to ensure service availability and fair usage.
- Request/Response Transformation: Modifying
apirequests or responses to meet the requirements of different clients or backend services, standardizing formats. - Routing: Directing requests to the correct microservice or backend endpoint based on rules.
- Monitoring and Logging: Providing a centralized point for
apitraffic analytics and auditing. - Security Policies: Enforcing
apikeys, JWT validation, IP whitelisting, and other security controls.
Platforms like AWS API Gateway for cloud-native applications, or open-source solutions like Kong, Envoy, or our very own ApiPark, specialize in providing these capabilities. APIPark, for example, is not just an api gateway but an AI gateway and comprehensive api management platform. It streamlines the integration and deployment of both traditional REST apis and complex AI models, offering features like unified api formats for AI invocation, prompt encapsulation into new apis, and end-to-end api lifecycle management. APIPark provides a robust gateway for managing api services, enabling quick integration of over 100 AI models, ensuring independent api and access permissions for multiple tenants, and offering performance rivaling Nginx. It also includes powerful data analysis and detailed api call logging, transforming how enterprises govern their api ecosystem, especially for AI services.
While Grafana Agent focuses on securing its outbound programmatic api calls to AWS services, api gateway platforms focus on securing and managing inbound api calls to an organization's own services. Both are indispensable layers in a comprehensive security strategy, each addressing different facets of api interaction within the cloud ecosystem.
5.3 Impact of Proper Configuration on Observability and Compliance
The meticulous configuration of AWS Request Signing for Grafana Agent has far-reaching implications beyond just "making it work." It directly impacts the reliability of your observability data and your organization's ability to meet compliance requirements.
- Reliable Data Ingress: When Grafana Agent is properly authenticated and authorized, its
apicalls to AWS are consistently successful. This ensures a steady and uninterrupted flow of metrics, logs, and traces into your observability platform. Any misconfiguration leading toAccess DeniedorSignatureDoesNotMatcherrors can result in critical data gaps, leaving you blind to performance issues, security incidents, or operational anomalies. Accurate and timely data is the bedrock of effective monitoring. - Data Integrity and Non-Repudiation: SigV4's cryptographic signing guarantees the integrity of the request payload. This means the metrics and logs Grafana Agent sends have not been altered in transit, providing confidence in the accuracy of your observability data. Furthermore, the authentication aspect ensures non-repudiation – you know who sent the data, which is crucial for auditing.
- Meeting Compliance Requirements: Many regulatory frameworks (e.g., HIPAA, PCI DSS, GDPR, SOC 2) mandate strict access controls and auditability for systems handling sensitive data. By implementing least privilege IAM policies and using secure credential mechanisms like IAM roles, you can demonstrate that access to your monitoring infrastructure (and by extension, the data it collects) is tightly controlled and auditable. AWS CloudTrail logs, combined with Grafana Agent's secure interactions, provide the necessary audit trails to satisfy these compliance mandates. This chain of trust, from data source to secure
apito observability platform, is fundamental.
5.4 Future Trends in Cloud APIs and Security
The landscape of cloud apis and their security is constantly evolving. Staying abreast of future trends is essential for building resilient and forward-looking architectures.
- Serverless APIs: The rise of serverless computing (AWS Lambda, Azure Functions, Google Cloud Functions) often means
apis are implemented usingAPI Gatewayservices integrated directly with these functions. Securing theseapis becomes about managing theAPI Gatewaypolicies, Lambda permissions, and the invocation models. - Zero-Trust Architectures: The "never trust, always verify" principle is gaining traction. This means every
apicall, even between internal services, requires explicit authentication and authorization. Micro-segmentation, identity-aware proxies, and granular access policies are key components. - Automated Security Policy Enforcement: Leveraging Infrastructure as Code (IaC) and Policy as Code (PaC) tools to automatically define, deploy, and enforce security policies for
apis. This reduces human error and ensures consistent security across environments. - AI-Powered Security: Artificial intelligence and machine learning are increasingly being used to detect anomalous
apiusage patterns, identify sophisticated threats, and automate threat response, adding another layer of intelligence toapisecurity. - GraphQL APIs: As GraphQL
apis become more prevalent, new security considerations arise around query depth limits, complex authorization logic, and potential for denial-of-service attacks. - API Management as a Service (AMaaS): More comprehensive
apimanagement platforms, like APIPark, will continue to evolve, offering richer features for the entireapilifecycle, including advanced security, integration, and monetization capabilities, becoming indispensable for enterprises navigating complexapiecosystems, especially those integrating AI models.
Conclusion
The journey to establish robust and secure observability in the cloud is multifaceted, and a critical leg of this journey involves mastering the secure configuration of data collectors like Grafana Agent. As we have meticulously explored, the interaction between Grafana Agent and AWS services is underpinned by a sophisticated cryptographic protocol: AWS Request Signing, or Signature Version 4 (SigV4). This mechanism isn't merely a technical detail; it is the fundamental gateway that ensures every api call Grafana Agent makes to AWS is authenticated, authorized, and untampered, forming an unshakeable foundation for data integrity and system security.
We embarked by understanding the modular nature of Grafana Agent, its role as a flexible data gatherer, and the inherent necessity for secure api interactions within the vast AWS ecosystem. We then delved into the essential prerequisites, emphasizing the paramount importance of meticulously crafted IAM policies that adhere to the principle of least privilege. The adoption of IAM roles, especially for cloud-native deployments, emerged as the gold standard for credential management, circumventing the risks associated with static access_key_id and secret_access_key. Our detailed configuration examples for various Grafana Agent components, from CloudWatch metrics scraping to CloudWatch Logs collection, illuminated how these secure practices translate directly into agent.yaml definitions.
Throughout this guide, we consciously woven in the pervasive role of apis in every interaction and the concept of a gateway as a secure access point. We observed how Grafana Agent secures its direct api calls to AWS services, and then naturally contextualized this within the broader landscape of api management platforms. Solutions like ApiPark exemplify how modern api gateway platforms centralize and simplify the management and security of an organization's own apis, including complex AI models, offering an all-encompassing api management experience that complements the granular security provided by SigV4 for direct cloud service interactions.
Finally, our exploration extended to advanced best practices, stressing the continuous commitment to security through regular key rotation, meticulous auditing via CloudTrail, and careful time synchronization. We also armed you with strategies for troubleshooting common Access Denied and SignatureDoesNotMatch errors, ensuring that operational hiccups do not compromise your observability pipeline. Recognizing the impact of proper configuration on data reliability and compliance, and peering into the future of api security, solidified our understanding that secure api interactions are not just about functionality, but about fostering trust and resilience in complex distributed systems.
In essence, mastering Grafana Agent's AWS Request Signing configuration is more than a technical triumph; it's an investment in the reliability, security, and integrity of your cloud operations. It ensures that the vital insights derived from your monitoring data are always accurate, always available, and always trustworthy, empowering you to navigate the complexities of the cloud with confidence and control.
FAQ: How to Configure Grafana Agent for AWS Request Signing
Here are 5 frequently asked questions regarding the configuration of Grafana Agent for AWS Request Signing:
Q1: What is AWS Request Signing and why is it necessary for Grafana Agent when interacting with AWS services?
A1: AWS Request Signing (specifically Signature Version 4 or SigV4) is a cryptographic protocol used by AWS to authenticate and authorize every programmatic request made to its services. It involves using your AWS secret access key to create a unique signature of the request, which is then sent along with the request. This signature verifies the identity of the sender and ensures the request has not been tampered with in transit. It's necessary for Grafana Agent because, like any other application, it makes api calls to AWS services (e.g., CloudWatch, CloudWatch Logs) to collect metrics and logs. Without proper SigV4, these api calls would be unauthenticated, unauthorized, and susceptible to security vulnerabilities, preventing Grafana Agent from securely accessing your AWS resources and compromising your observability data.
Q2: What is the most secure and recommended way to provide AWS credentials to Grafana Agent when it's running on an EC2 instance or within an EKS cluster?
A2: The most secure and recommended way is to use IAM Roles. * For EC2 Instances: Create an IAM role with the principle of least privilege, attach the necessary permissions policy (e.g., read-only access to CloudWatch and CloudWatch Logs), and associate this role with the EC2 instance profile when launching or modifying the instance. Grafana Agent will then automatically assume this role and obtain temporary, regularly rotated credentials from the EC2 Instance Metadata Service, eliminating the need to store static access_key_id or secret_access_key on the instance. * For EKS Clusters: Leverage IAM Roles for Service Accounts (IRSA). This involves associating an IAM role with a Kubernetes service account. Grafana Agent pods configured to use that service account will then securely obtain temporary AWS credentials, further isolating credentials to specific workloads and enhancing security.
Q3: How can I troubleshoot "Access Denied" or "UnauthorizedOperation" errors when Grafana Agent attempts to interact with AWS services?
A3: These errors almost always indicate an issue with IAM permissions. Here's a systematic approach: 1. Review IAM Policy: Carefully examine the IAM policy attached to the role or user that Grafana Agent is using. Ensure it explicitly grants the required Action (e.g., cloudwatch:GetMetricData, logs:FilterLogEvents) on the specific Resource (e.g., * or a particular ARN) that the agent is trying to access. 2. Verify Credential Provider: Confirm that Grafana Agent is actually picking up the intended credentials. If you expect it to use an IAM role, verify the role is correctly associated. If you're using environment variables, check they are correctly set. 3. Check CloudTrail Logs: AWS CloudTrail logs all api calls. Reviewing CloudTrail events for the failed operations can provide specific error codes and the exact IAM principal that was denied, offering precise insights into the missing permissions. 4. Use IAM Policy Simulator: Leverage the AWS IAM Policy Simulator to test if a given IAM identity has the necessary permissions for a specific action on a resource.
Q4: Can Grafana Agent collect metrics and logs from multiple AWS regions simultaneously?
A4: Yes, Grafana Agent can be configured to collect metrics and logs from multiple AWS regions concurrently. For components like cloudwatch_exporter_configs (for metrics) or loki_source_cloudwatch_logs (for logs), you typically specify the region or regions parameter within their respective configuration blocks in the agent.yaml file. For instance, loki_source_cloudwatch_logs accepts a list of regions, allowing a single agent to fan out and collect logs from designated log groups across different geographical AWS regions. This is particularly useful for global deployments or multi-region disaster recovery strategies.
Q5: How does an api gateway like APIPark relate to Grafana Agent's AWS interactions and the broader concept of api security?
A5: Grafana Agent and an api gateway address different, albeit complementary, aspects of api interactions and security. Grafana Agent is an outbound client that makes secure api calls to AWS's own service endpoints (e.g., CloudWatch api) using AWS Request Signing (SigV4) for authentication and authorization. It's about securing your monitoring tool's access to cloud services.
An api gateway, such as ApiPark, on the other hand, acts as an inbound traffic gateway to your organization's own apis (whether they are custom REST apis or AI model apis). It provides centralized api management, security (authentication, authorization, rate limiting), traffic routing, and transformation for clients consuming your services. While SigV4 secures Grafana Agent's interaction with the AWS api endpoints, APIPark secures client interactions with your api endpoints, creating a robust and managed gateway for all your custom services, especially those leveraging AI. Both are crucial layers in a comprehensive cloud security and management strategy.
🚀You can securely and efficiently call the OpenAI API on APIPark in just two steps:
Step 1: Deploy the APIPark AI gateway in 5 minutes.
APIPark is developed based on Golang, offering strong product performance and low development and maintenance costs. You can deploy APIPark with a single command line.
curl -sSO https://download.apipark.com/install/quick-start.sh; bash quick-start.sh

In my experience, you can see the successful deployment interface within 5 to 10 minutes. Then, you can log in to APIPark using your account.

Step 2: Call the OpenAI API.

