Using temporary credentials

The process that requires access to AWS services across the board needs to be granted permissions by using temporary credentials instead of hardcoding fixed credentials in the process memory space. AWS Cognito's Identity Pool and Amazon STS are a few options for implementing a mechanism where services can request temporary credentials that are scoped to the narrowest possible permissions and are valid for a short period of time (typically an hour).

Adopting this approach, the scope of misuse of compromised credentials is reduced in time and space.

Get Hands-On Serverless Applications with Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.