question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Describe the bug An RDS policy to modify the Iops of a database fails with error "An error occurred (InvalidParameterCombination) when calling the ModifyDBInstance operation: You must specify both the storage size and iops when modifying the storage size or iops on a DB instance that has iops."

To Reproduce

"actions": [
  {
    "type": "modify-db",
    "update": [
      {
        "property": "Iops",
        "value": 4000
      }
    ],
    "immediate": true
  }

Expected behavior Modify the Iops of an RDS database.

Background

  • Custodian Version: c7n:0.9.6
  • Cloud Provider: AWS
  • Policy:
policies:
  - name: rds_iops_higher
    resource: rds
    mode:
      type: periodic
      role: cloud-custodian-rds-iops-modify
      schedule: "cron(1 * * * ? *)"
      dead_letter_config:
        TargetArn: arn:aws:sqs:us-east-1:{account_id}:CustodianLambdasDLQ
    filters:
      - type: onhour
        weekends: false
        default_tz: ct
        tag: xray_iops_modify
        opt-out: false
        onhour: 5
    actions:
       - type: modify-db
         update:
           - property: 'Iops'
             value: 12000
         immediate: true

Additional context When adding an additional property for AllocatedStorage, the same error happened. It does not look like, when looking at CloudTrail, Custodian is passing the property though? Is that because it matches the current value?

This might not be a custodian thing if it’s simply passing every property specified along verbatim to the eventual API call…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
kapiltcommented, Mar 31, 2021

yes we’re pass through on parameters here, its worth reading the rds docs. ie. you can’t set iops on an instance thats not using provisioned iops storage. ie you should be filtering on storage type io1 else provisioned iops isn’t valid.

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS

0reactions
rneu31commented, Apr 2, 2021

https://github.com/cloud-custodian/cloud-custodian/blob/master/c7n/resources/rds.py#L1785-L1790

This code here seems to be filtering any parameter that matches the current value, right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with storage for Amazon RDS DB instances
You can modify the settings for a DB instance that uses Provisioned IOPS SSD storage by using the Amazon RDS console, AWS CLI,...
Read more >
Increase Provisioned IOPS in RDS leads to downtime?
IOPS : The new Provisioned IOPS (I/O operations per second) value for the RDS instance. Changing this setting does not result in an...
Read more >
My RDS is running out of IOPS. What can I do? - Renato Losio
Let's immediately discard the option of changing the instance type. Unless you are currently running a micro or small t2 instance, the change...
Read more >
amazon-rds-user-guide/Overview.DBInstance.Modifying.md at ...
To modify a DB instance by using the Amazon RDS API, call the ModifyDBInstance operation. Specify the DB instance identifier, and the parameters...
Read more >
Changing AWS RDS IOPS provisioning in production - Medium
Recently we had to change the amount of IOPS we had provisioned on our production instances. The ModifyDBInstance documentation says this ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found