Skip to content

Why have two keys for the Product Advertising API

0

Hi All,

I just got out of a chat with support because I was receiving a too many requests throttling error. I had not used the keys for quite some time so I thought that maybe the had expired. Therefore I deleted the one from 2015 and kept the one from 2017. I still received the error so I asked support why. I was told that by deleting the key from 2015 and recreating it, that it had invalidated the key from 2017 as well. It would also take 72 hours for them to be active again. I asked if this what normally happens and I was told yes.

My question is, why have two API keys then? If they both act as one, I see no reason to have two of them.

I saw the statement, "We recommend that you change your Access Keys every 90 days. ", and thought okay, I can alternate between keys in order to keep my service active. This makes sense for two keys but if they act as one, then why would you even adhere to this recommendation as it would mean your service is down for 72 hours every time you change the keys.

Am I missing something in my understanding of what I have been told?

Cheers,

Tom

asked 2 years ago277 views

3 Answers
1

Thank you for raising this important question about API key management. Let me explain the purpose of having two API keys in a more comprehensible manner: The two-key system is designed for seamless key rotation and continuous service operation. The proper procedure should be:

Keep both existing keys operational

Generate new key(s) when rotation is needed

Implement the new key(s) in your application

Verify functionality

Only after confirmation, deactivate the old key(s)

The issue you encountered occurred because the old key was deleted before properly establishing the new one. Both keys becoming invalid is actually a security measure, not a design flaw.

Regarding the 90-day rotation recommendation: This best practice is entirely feasible when following the correct rotation procedure outlined above. The 72-hour service interruption you experienced was due to the key deletion sequence, not an inherent requirement of key rotation.

To address your specific concern: The two keys are indeed linked for security purposes, but this doesn't negate their utility. Their primary value lies in enabling secure key rotation and providing backup access if needed.

For future reference, I would strongly recommend:

Maintaining both keys active during rotation

Testing new keys thoroughly before deactivating old ones

Planning key rotations in advance to prevent service disruptions

I trust this clarifies the purpose and proper utilization of the dual-key system.

AWS

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Hi,

    I understand what you are saying. The problem lies in the fact that I did exactly what you said.

    1. I deleted one key and kept an old one.
    2. I tested the new key and it did not work.
    3. I then put the key back in place that I did not delete and it did not work neither.

    I do understand the concept of rotating keys and followed the standard procedure. I am left wondering, is it because of the fact that the keys were so old that the system invalidated them both?

    Cheers,

    Tom

  • I understand your concern about the keys' unusual behavior. At this point, the best course of action is to: Wait for the 72-hour period as advised by support.After this period, test your new key again.If the issue persists, you should contact AWS support to: Verify if there are any account-level restrictions due to the extended inactivity Get clarification on the specific behavior of long-dormant keys Ensure there are no additional steps needed to reactivate your account Please let me know the results after the 72-hour waiting period, and we can determine next steps based on the outcome.

1

There seems to be some confusion in the information you've received. Typically, AWS access keys do not behave in the manner described. Let me clarify a few points:

  1. AWS IAM users can have up to two active access keys at a time. These keys are independent of each other and do not "act as one."

  2. Creating or deleting one access key should not invalidate the other key. They are separate credentials.

  3. There is no standard 72-hour activation period for newly created access keys. They are usually active immediately upon creation.

  4. Having two keys is indeed useful for rotating keys without service interruption. You can create a new key, update your applications to use the new key, and then delete the old key.

  5. The recommendation to change keys every 90 days is a security best practice, not a technical requirement. Changing keys doesn't automatically cause downtime if done correctly.

The behavior you've described is not typical for AWS IAM access keys. It's possible there was a misunderstanding in the support conversation, or there might be some specific circumstances related to the Product Advertising API that differ from standard AWS practices.

For the Product Advertising API specifically, you might want to double-check the documentation or reach out to support again for clarification. The behavior you've described doesn't align with how AWS access keys typically function.

Regarding the throttling error, this is usually related to exceeding the allowed request rate for the API, rather than key expiration or invalidation. Each API key typically has its own quota, so using a different valid key shouldn't inherit throttling from another key.

If you're still experiencing issues, it might be worth discussing the specific throttling limits and your usage patterns with the Product Advertising API support team to ensure you're within the allowed limits.
Sources
AccessKeyMetadata - AWS Identity and Access Management
[bug report] [IAM] you can create more than 2 access keys per user | AWS re:Post

answered 2 years ago

EXPERT

reviewed 2 years ago

  • Hi,

    I totally agree with everything you are saying. That is what has left me confused here. The keys have not been used in a couple of years, so there are no systems using them, other than the one I just setup. I too thought the message of throttling was different than I was being told. Perhaps there is indeed a difference between the two systems. I will give it 72 hours and see if the new key works. If it does not, then I guess I am back to square one. The old key still does not work and I have no other systems using it. My understanding is that the throttling happens on a second by second basis. So, you would have though it would have been cleared by now.

    Cheers,

    Tom

0

Hi, were you able to resolve this? I am having the same issue.

answered 2 years 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.