AWS, Cloud Computing, SAP

3 Mins Read

Simplifying SAP Password Rotation with AWS Secrets Manager

Voiced by Amazon Polly


In today’s dynamic IT landscape, security is paramount, and effective password management is crucial to ensuring data integrity and safeguarding sensitive information. This blog post explores how to use AWS Secrets Manager, which protects access to your apps, services, and IT resources without requiring you to pay for upfront infrastructure maintenance or ongoing expenditures, in conjunction with SAP password rotation.

Why Password Rotation Matters?

Regular password rotation is a fundamental security practice that helps mitigate the risk of unauthorized access and potential security breaches. As the backbone of many enterprise operations, SAP systems require robust password management to comply with security best practices and regulatory requirements.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

AWS Secrets Manager Overview

With AWS Secrets Manager, a fully managed service, you can rotate, manage, and retrieve database credentials, API keys, and other secrets at any point in their lifecycle. By integrating AWS Secrets Manager with SAP systems, organizations can automate the rotation of SAP passwords, enhancing security and simplifying the management process.

Benefits of AWS Secrets Manager for SAP Password Rotation

  • Automation: By automating the entire password rotation process, AWS Secrets Manager lowers the possibility of human error and guarantees that passwords are changed automatically regularly.
  • Enhanced Security: The automatic rotation of SAP passwords enhances security by minimizing the risk associated with static credentials. This proactive approach aligns with security best practices and regulatory compliance requirements.
  • Centralized Management: AWS Secrets Manager provides a centralized location to manage and secure secrets, simplifying the storage, retrieval, and rotation of SAP passwords.
  • Audit Trails: Detailed audit trails and logging capabilities offered by AWS Secrets Manager help organizations track changes, monitor access, and maintain compliance with regulatory standards.


Figure 1 depicts the architecture of this approach. Passwords for SAP users are kept in AWS Secrets Manager as secrets. These secrets are set up to cycle following the timetable you establish. AWS Secrets Manager calls the AWS Lambda function to rotate a secret. Once the secret has been successfully rotated, the AWS Lambda function connects to SAP over RFC using PyRFC and the SAP NetWeaver RFC SDK. It then calls a regular SAP ABAP function to modify the user’s password.

Note that the AWS Identity and Access Management (IAM) role attached to the AWS Lambda function provides the authorization needed to create an Elastic Network Interface (ENI). The Amazon Virtual Private Cloud (Amazon VPC), home of SAP systems, and the AWS Lambda function are connected over the network via this ENI. This ENI’s security group is equipped with egress rules. Permissions are also required for the AWS Lambda function to use an AWS Key Management Service (KMS) key for secret encryption and decryption. The following sections cover the automatic creation of an AWS IAM role and security group throughout the deployment process.



  • SAP NetWeaver ABAP (SAP BW/4HANA, SAP S/4HANA, and SAP ECC, for instance).
  • A user of the SAP ABAP service who is authorized to update or modify passwords. We’ll refer to this as the administrator of the SAP password.
  • SAP ABAP user for testing purposes.
  • Your SAP NetWeaver systems can receive inbound network traffic because of the Amazon VPC security group.
  • An Amazon Key Management Service (KMS) key that the user handles.
  • Make two AWS Lambda layers, as shown in the AWS Lambda Layer for PyRFC and AWS Lambda Layer for SAP NetWeaver RFC SDK.

Integration Steps

  1. Go to AWS Secrets Manager by opening the AWS Management Console.
  2. Keep the administrator credentials for the SAP password in an AWS Secrets Manager secret. Apart from the password, the secret must contain the SAP connection details.
  3. Keep the SAP user’s credentials in another AWS Secrets Manager secret that you want to cycle.
  4. To manage the secret rotation, create the AWS Lambda function. Look up SAP-ABAP-secret-rotation online. Ensure the Show apps that create custom IAM roles or resource policy options are selected.
  5. Select ABAP-secret-rotation-SAP.
  6. After entering the appropriate parameters, launch the application
  7. Select Edit rotation after opening the AWS Secrets Manager secret associated with the SAP user.
  8. Turn on the option for automatic rotation. Give a schedule for the rotation.
  9. The AWS Lambda rotation function matches the AWS Lambda function installed by the AWS Serverless Application Repository.
  10. Save Changes.
  11. Monitor and Review: Regularly monitor Amazon CloudWatch logs and AWS Secrets Manager activity to review password rotations and ensure compliance.


Integrating SAP password rotation with AWS Secrets Manager streamlines the management of credentials, enhances security, and aligns with best practices for privileged access management. By automating password rotation, organizations can reduce the risk of security breaches, improve overall compliance, and ensure the integrity of their SAP systems in the ever-evolving landscape of cybersecurity threats.

Drop a query if you have any questions regarding AWS Secrets Manager and we will get back to you quickly.

Making IT Networks Enterprise-ready – Cloud Management Services

  • Accelerated cloud migration
  • End-to-end view of the cloud environment
Get Started

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, AWS Training Partner, AWS Migration Partner, AWS Data and Analytics Partner, AWS DevOps Competency Partner, Amazon QuickSight Service Delivery Partner, Amazon EKS Service Delivery Partner, Microsoft Gold Partner, AWS Microsoft Workload Partners, Amazon EC2 Service Delivery Partner, and many more.

To get started, go through our Consultancy page and Managed Services PackageCloudThat’s offerings.


1. Can I customize the rotation schedule for SAP passwords with AWS Secrets Manager?

ANS: – Yes, AWS Secrets Manager provides flexibility in defining custom rotation schedules based on your organization’s security policies and compliance requirements.

2. How does AWS Secrets Manager handle the rotation of SAP passwords without disrupting system availability?

ANS: – AWS Secrets Manager employs a rotation strategy that involves creating a new version of the secret with the updated password before removing the old version. This ensures a smooth transition without causing service disruptions.



    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!