Welcome - Amazon Secrets Manager
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Welcome

Amazon Secrets Manager provides a service to enable you to store, manage, and retrieve, secrets.

This guide provides descriptions of the Secrets Manager API. For more information about using this service, see the Amazon Secrets Manager User Guide.

API Version

This version of the Secrets Manager API Reference documents the Secrets Manager API version 2017-10-17.

Although you can make direct calls to the Secrets Manager HTTPS Query API, we recommend that you use one of the SDKs instead. The SDK performs many useful tasks you otherwise must perform manually. For example, the SDKs automatically sign your requests and convert responses into a structure syntactically appropriate to your language.

For SDKs, see:

Making HTTPS query requests

The Query API for Amazon Secrets Manager lets you call service operations. Query API requests are HTTPS requests that must contain an Action parameter to indicate the operation to be performed. Amazon Secrets Manager supports GET and POST requests for all operations. The API doesn't require you to use GET for some operations and POST for others. However, GET requests are subject to the limitation size of a URL. Although this limit depends on the browser , a typical limit is 2048 bytes. Therefore, for Query API requests that require larger sizes, you must use a POST request.

For a list of endpoints, see Amazon Secrets Manager endpoints.

The API returns the response in an XML document. For details about the response, see the individual API description pages in the Amazon Organizations API reference.

Because the Query API returns sensitive information such as security credentials, you must use HTTPS to encrypt all API requests.

When you send HTTP requests to Amazon, you must sign the requests so Amazon can identify the sender. You must use Signature Version 4. If you have an existing application that uses Signature Version 2, you must update it to use Signature Version 4.

You sign requests with your Amazon access key, which consists of an access key ID and a secret access key. We strongly recommend you don't create an access key for your root user. Anyone who has the access key for your root user has unrestricted access to all the resources in your account. Instead, create an access key for an IAM user with permissions required for the task at hand. As another option, use Amazon Security Token Service to generate temporary security credentials, and use those credentials to sign requests.

For more information, see the following:

  • Amazon Security Credentials. Provides general information about the types of credentials you can use to access Amazon.

  • IAM Best Practices. Offers suggestions for using the IAM service to help secure your Amazon resources, including those in Secrets Manager.

  • Temporary Credentials. Describes how to create and use temporary security credentials.

When you use the Amazon Command Line Interface (Amazon CLI) or one of the Amazon SDKs to make requests to Amazon, these tools automatically sign the requests for you with the access key that you specify when you configure the tools.

The JSON that Amazon Secrets Manager expects as your request parameters and the service returns as a response to HTTP query requests contain single, long strings without line breaks or white space formatting. The JSON shown in the examples in this guide displays the code formatted with both line breaks and white space to improve readability. When example input parameters can also cause long strings extending beyond the screen, you can insert line breaks to enhance readability. You should always submit the input as a single JSON text string.

Support and Feedback for Amazon Secrets Manager

We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com, or post your feedback and questions in the Amazon Secrets Manager Discussion Forum. For more information about the Amazon Discussion Forums, see Forums Help.

Logging API Requests

Amazon Secrets Manager supports Amazon CloudTrail, a service that records Amazon API calls for your Amazon account and delivers log files to an Amazon S3 bucket. By using information that's collected by Amazon CloudTrail, you can determine the requests successfully made to Secrets Manager, who made the request, when it was made, and so on. For more about Amazon Secrets Manager and support for Amazon CloudTrail, see Logging Amazon Secrets Manager Events with Amazon CloudTrail in the Amazon Secrets Manager User Guide. To learn more about CloudTrail, including enabling it and find your log files, see the Amazon CloudTrail User Guide.

This document was last published on March 28, 2024.