Interview Prep/Terraform/Authentication and Cloud API Errors

`ResourceConflictException: The operation cannot be performed at this time. An update is in progress for resource` on Lambda updates.

IntermediateTroubleshootingAuthentication and Cloud API Errors
Answer

Likely causes → Two updates to the same function (code and configuration) in quick succession; Lambda only allows one at a time while LastUpdateStatus is InProgress.

Diagnose → aws lambda get-function-configuration --function-name api --query '[State,LastUpdateStatus]'

Fix → Re-run apply. Upgrade the AWS provider (newer versions wait for update completion). Avoid other tools updating the same function concurrently.

Prevent → One owner for function updates (Terraform or the app deploy pipeline, not both).

All Terraform questions

More on Authentication and Cloud API Errors