Aws Secretsmanager Caching Net

The AWS Secrets Manager .NET caching client enables in-process caching of secrets for C# applications.
Alternatives To Aws Secretsmanager Caching Net
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Awesome Aws11,514
8 days ago1December 21, 201565otherPython
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.
Aws Sdk Go8,3175,1008,5123 days ago1,641September 23, 202255apache-2.0Go
AWS SDK for the Go programming language.
Boto38,12211,5454,6803 days ago1,140July 06, 2022174apache-2.0Python
AWS SDK for Python
Aws Doc Sdk Examples7,674
3 days ago99April 23, 2021215apache-2.0Java
Welcome to the AWS Code Examples Repository. This repo contains code examples used in the AWS documentation, AWS SDK Developer Guides, and more. For more information, see the Readme.md file below.
Aws Sdk Js7,40235,30613,7023 days ago1,470September 23, 2022158apache-2.0JavaScript
AWS SDK for JavaScript in the browser and Node.js
Aws Sdk Java3,95726223 days ago933May 04, 2022119apache-2.0
The official AWS SDK for Java.
Aws Sdk Ruby3,44720,4621,4763 days ago1,207September 01, 202122apache-2.0Ruby
The official AWS SDK for Ruby.
Rusoto2,5951644046 months ago26April 25, 2022255mitRust
AWS SDK for Rust
Aws Sdk Js V32,3934273 days ago156September 27, 2022354apache-2.0TypeScript
Modularized AWS SDK for JavaScript.
Aws Sdk Go V22,009751,7953 days ago754July 05, 202276apache-2.0Go
AWS SDK for the Go programming language.
Alternatives To Aws Secretsmanager Caching Net
Select To Compare


Alternative Project Comparisons
Readme

AWS Secrets Manager Caching Client for .NET

NuGet .NET codecov

The AWS Secrets Manager caching client enables in-process caching of secrets for .NET applications.

Required Prerequisites

To use this client, you must have:

  • A .NET project with one of the following:

    • .NET Framework 4.6.1 or higher
    • .NET Standard 2.0 or higher
  • An Amazon Web Services (AWS) account to access secrets stored in AWS Secrets Manager and use AWS SDK for .NET.

    • To create an AWS account, go to Sign In or Create an AWS Account and then choose I am a new user. Follow the instructions to create an AWS account.

    • To create a secret in AWS Secrets Manager, go to Creating Secrets and follow the instructions on that page.

    • To download and install the AWS SDK for .NET, go to Installing the AWS SDK for .NET in the AWS SDK for .NET documentation and then follow the instructions on that page.

Download

You can get the latest release from Nuget:

<ItemGroup>
     <PackageReference Include="AWSSDK.SecretsManager.Caching" Version="1.0.5" />
</ItemGroup>

Getting Started

The following code sample demonstrates how to start using the caching client:

using System;
using Amazon.SecretsManager.Extensions.Caching.SecretsManagerCache;

namespace LambdaExample {
    public class CachingExample 
    {
        private SecretsManagerCache cache = new SecretsManagerCache();
        private const String MySecretName = "MySecret";

        public async Task<Response> FunctionHandlerAsync(String input, ILambdaContext context)
        {
            String MySecret = await cache.GetSecretString(MySecretName);
            ...
        }
    }
}
  • After instantiating the cache, retrieve your secret using GetSecretString or GetSecretBinary.
  • On successive retrievals, the cache will return the cached copy of the secret.
  • Learn more about AWS Lambda Function Handlers in C#.

Cache Configuration

You can configure the SecretCacheConfiguration object with the following parameters:

  • CacheItemTTL - The TTL of a Cache item in milliseconds. The default value is 3600000 ms, or 1 hour.
  • MaxCacheSize - The maximum number of items the Cache can contain before evicting using LRU. The default value is 1024.
  • VersionStage - The Version Stage the Cache will request when retrieving secrets from Secrets Manager. The default value is AWSCURRENT.
  • Client - The Secrets Manager client to be used by the Cache. The default value is null, which causes the Cache to instantiate a new Secrets Manager client.
  • CacheHook - An implementation of the ISecretCacheHook interface. The default value is null.

Getting Help

We use GitHub issues for tracking bugs and caching library feature requests and have limited bandwidth to address them. Please use these community resources for getting help:

License

This library is licensed under the Apache 2.0 License.

Popular Amazon Web Services Projects
Popular Aws Sdk Projects
Popular Cloud Computing Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
C Sharp
Aws
Aws Sdk