Skip to content

How to install InfluxDB on AWS v3 via CDK

0

InfluxDB on AWS v3 can be installed via console. But the current CDK and CloudFormation seems not to support InfluxDB on AWS v3. I tried different ways CDK, CloudFormation, CLI without success.

Therefore I was required to install the instance manually on console and integrate the service into other services in CDK for a customer. I would prefer to have the installation part also completely covered in CDK/CloudFormation.

Is it planned to cover the installation of "InfluxDB on AWS" v3 via CDK?

2 Answers
1

Based on the current AWS documentation, Amazon Timestream for InfluxDB 3 can be created using the AWS Management Console and the AWS CLI, but there is no mention of native AWS CDK or CloudFormation support for InfluxDB 3 clusters at this time.

The available methods for creating InfluxDB 3 clusters are:

  1. AWS Management Console: You can configure cluster-level settings including instance class, parameter group, network configuration, and public accessibility through the console interface.

  2. AWS CLI: You can use the create-db-cluster command to programmatically create InfluxDB 3 Core or Enterprise clusters, specifying parameters such as region, name, DB parameter group identifier, instance type, VPC subnet IDs, and security group IDs.

Since you're working with CDK and need to integrate InfluxDB 3 into your infrastructure as code, you have a few options:

  • Use CDK's escape hatch with L1 constructs: While there may not be high-level CDK constructs available, you could potentially use L1 (CloudFormation-level) constructs if CloudFormation support exists, though this doesn't appear to be the case currently.

  • Execute CLI commands from CDK: You could use CDK custom resources to execute the AWS CLI commands as part of your CDK deployment, though this is less elegant than native support.

  • Hybrid approach: Continue with your current approach of manually creating the InfluxDB instance and referencing it in your CDK code for integration with other services.

Regarding future support, I cannot provide information about AWS's product roadmap or planned features. I recommend checking the AWS CDK GitHub repository for feature requests or submitting a feature request through AWS Support channels to express your need for native CDK/CloudFormation support for InfluxDB 3.
Sources
Layer 1 constructs - AWS Prescriptive Guidance
Create a cluster in Timestream for InfluxDB 3 - Amazon Timestream
Configuring an InfluxDB 3 cluster in Timestream - Amazon Timestream

answered 3 months ago
EXPERT
reviewed 3 months ago
0

Currently there isn’t a high-level CDK construct for Amazon Timestream for InfluxDB, but you can still automate the deployment instead of using the console by leveraging CloudFormation + CLI or CDK L1 resources.

One practical approach is to deploy the instance through CloudFormation from CLI, then reference it in CDK stacks.

Example CloudFormation deployment via CLI

cat <<EOF > influxdb.yaml
Resources:
  InfluxDBInstance:
    Type: AWS::Timestream::InfluxDBInstance
    Properties:
      Name: my-influxdb
      DbInstanceType: db.influx.medium
      AllocatedStorage: 20
      Username: admin
      Password: StrongPassword123!
      Organization: metrics-org
      Bucket: metrics
      DeploymentType: SINGLE_AZ
      VpcSubnetIds:
        - subnet-abcd
      VpcSecurityGroupIds:
        - sg-abcd
EOF

aws cloudformation deploy \
  --stack-name influxdb-stack \
  --template-file influxdb.yaml

This keeps the deployment fully IaC-driven and allows CDK stacks to consume the created endpoint.

Documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-timestream-influxdbinstance.html

answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.