Hello, I'm looking at an Aurora serverless v2 inst...
# general
f
Hello, I'm looking at an Aurora serverless v2 instance example at https://www.pulumi.com/registry/packages/aws/api-docs/rds/cluster/#rds-serverless-v2-cluster (Python). There, it says to use the following to specify a scaling configuration:
Copy code
serverlessv2_scaling_configuration=aws.rds.ClusterServerlessv2ScalingConfigurationArgs(
    max_capacity=1,
    min_capacity=0.5,
)
I have had a look in
aws.rds
package and the
ClusterServerlessv2ScalingConfigurationArgs
class doesn't seem to be there. Error message when I run a Pulumi preview:
AttributeError: module 'pulumi_aws.rds' has no attribute 'ClusterServerlessv2ScalingConfigurationArgs'
I can only find the scaling configuration class for serverless v1:
ClusterScalingConfigurationArgs
Can anyone advise as to what I am doing wrong, please? I am using Pulumi v3.72.2. Thank you.
m
Hi there! What version of
pulumi-aws
are you using? I've got
pulumi-aws>=5.0.0,<6.0.0
in my
requirements.txt
, and the code in that example seems to work for me without modification:
Copy code
Previewing update (dev)

     Type                        Name                    Plan       
 +   pulumi:pulumi:Stack         aws-eks-dev             create     
 +   ├─ aws:rds:Cluster          exampleCluster          create     
 +   └─ aws:rds:ClusterInstance  exampleClusterInstance  create     

Resources:
    + 3 to create
The input arguments are a little hard to find on the page, but they're there, linked from the
serverlessv2_scaling_configuration
input: https://www.pulumi.com/registry/packages/aws/api-docs/rds/cluster/#serverlessv2_scaling_configuration_python
Also seems to deploy as well, so my guess is that maybe you're on an older version?
f
My
dockerfile_requirements.txt
file has the following entry:
pulumi_aws==5.1.1
m
Yeah looks like I'm on 5.41 (latest), so that might be the issue.
f
Yes, it is. Thanks. Upgrading to 5.4.1 solved the issue.