Arkinu
AWS service comparison

AWS Secrets Manager vs AWS Systems Manager: differences and when to use each

AWS Secrets Manager
AWS Systems Manager

Often confused on the examQuestions tend to offer one as a distractor for the other: look for the phrase in the scenario that tips the balance.

Security, Identity, and Compliance

AWS Secrets Manager

Service for storing, retrieving, and rotating secrets such as database credentials, API keys, and OAuth tokens throughout their lifecycle. It helps you avoid hardcoding credentials in code: the application requests them from the service when it needs them, and rotation can be automatic.

Exam phrases that point here

  • «automatically rotate database credentials»

    Secrets Manager rotates secrets on a schedule and updates both the secret and the password in the database, with built-in support for Amazon RDS, Amazon DocumentDB, and Amazon Redshift.

    When not: If you only need to store configuration parameters or encrypted values without rotation, AWS Systems Manager Parameter Store may be enough and is simpler.

  • «remove credentials hardcoded in the application code»

    The application requests the secret from Secrets Manager at runtime, with IAM permissions, instead of carrying the password in the code or in a file.

    When not: If what the application needs is credentials to call AWS services, the answer is an IAM role with temporary credentials, not a stored secret.

  • «securely store third-party API keys»

    In addition to database credentials, Secrets Manager stores API keys, SaaS or on-premises credentials, and SSH keys, encrypted with KMS.

    When not: If what you need to store is an encryption key used to encrypt data, the service is AWS KMS (or CloudHSM), not a secret.

  • «restrict which teams can read each secret»

    IAM policies control who reads or administers each secret; for example, developers with access only to the development secrets.

    When not: If the access control being asked for is over who uses an encryption key, it is solved with the KMS key policy.

  • «rotate credentials without affecting the application»

    Rotation tests the new credential before marking it as current, and open connections are not cut because authentication only happens when connecting.

    When not: If the application caches the password or keeps it in its configuration and does not request it again, rotation will leave it with an old credential: you have to adapt the application before turning on rotation.

Often paired with

  • Amazon RDS
  • AWS Lambda
  • AWS KMS
Study AWS Secrets Manager →

Management and Governance

AWS Systems Manager

Service for centrally viewing, managing, and operating nodes in AWS, on premises, and in other clouds. It lets you apply patches, run commands, and connect to nodes without opening inbound ports, and securely store data that applications use.

Exam phrases that point here

  • «connect to instances without opening inbound ports, without a bastion host, and without SSH keys»

    Session Manager opens a shell session from the console or the CLI; the instance's SSM Agent initiates the connection to the service, so no inbound port is needed, and access is controlled only with IAM policies.

    When not: It requires the instance to have the SSM Agent, an instance profile with permissions, and outbound access to Systems Manager (over the internet or through VPC endpoints). If the requirement is to connect entire networks, such as an office to the VPC, the answer is AWS Site-to-Site VPN or AWS Client VPN.

  • «record who connected to each server and which commands they ran»

    Session Manager can send the log of each session to Amazon S3 or to CloudWatch Logs, and CloudTrail records the API calls that start and end sessions.

    When not: Port forwarding sessions or SSH sessions through Session Manager are not logged that way. If the question is about auditing the API calls of the whole account, the service is AWS CloudTrail.

  • «automate the application of security patches across a fleet of instances»

    Patch Manager compares each node against a patch baseline that defines which patches are approved, and it can either only report the missing ones (Scan) or install them (Scan and install), with scheduling and compliance reports.

    When not: Patch Manager does not update major operating system versions. If the requirement is to detect software vulnerabilities, not to apply patches, Amazon Inspector fits.

  • «centrally store application configuration, such as endpoints or AMI IDs, without hardcoding it in the code»

    Parameter Store holds named parameters, organized in hierarchies and versioned, that applications and other services read at runtime; access is controlled with IAM and sensitive values are encrypted with AWS KMS (SecureString).

    When not: If these are credentials that must be rotated automatically, AWS recommends AWS Secrets Manager. If the configuration changes often and must be deployed gradually with automatic rollback, AWS AppConfig fits.

  • «manage servers on AWS, on premises, and in other clouds from a single place»

    Any machine with the SSM Agent that can communicate with the service becomes a managed node, whether it is an EC2 instance, an on-premises server, or a virtual machine in another cloud.

    When not: If the goal is to migrate those servers to AWS, think of AWS Transform MGN (formerly AWS Application Migration Service). If you only need to collect metrics and logs, the Amazon CloudWatch agent.

Often paired with

  • Amazon EC2
Study AWS Systems Manager →