-
Notifications
You must be signed in to change notification settings - Fork 154
Feature request: Put parameter #2871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @revmischa, thank you for opening this feature request. I don't see any issue with adding this feature, especially considering that Powertools for AWS Lambda (Python) already has it as well. In terms of DX, I think we should aim at something like this: import { setParameter } from '@aws-lambda-powertools/parameters/ssm';
export const handler = async (): Promise<void> => {
const parameterVersion = await setParameter('/my/parameter', {
value: 'foo'
});
}; The signature of the type ParameterType = 'String' | 'StringList' | 'SecureString';
type ParameterTier = 'Standard' | 'Advanced' | 'Intelligent-Tiering';
type SSMSetOptions = {
/**
* The parameter value
*/
value: string;
/**
* If the parameter value should be overwritten
* @default false
*/
overwrite?: boolean;
/**
* The description of the parameter
*/
description?: string;
/**
* Type of the parameter, can be one of `String`, `StringList`, or `SecureString`
* @default `String`
*/
parameterType?: ParameterType;
/**
* The parameter tier to use, can be one of `Standard`, `Advanced`, and `Intelligent-Tiering`
* @default `Standard`
*/
tier?: ParameterTier;
/**
* The KMS key id to use to encrypt the parameter
*/
kmsKeyId?: string;
/**
* Additional options to pass to the AWS SDK v3 client
*/
sdkOptions?: PutParameterCommandInput;
}
declare function setParameter(name: string, options: SSMSetOptions): string; When it comes to implementation, the work needed to add this feature will need to touch several areas in the codebase, below an initial list (some might be missing):
I'm putting the item on the backlog and opening it for contributions. Note For those interested in contributing, please leave a comment below so that we can assign the issue to you and make sure we don't duplicate efforts. Also, if you have any further questions please don't hesitate to ask here or on our Discord channel. |
@dreamorosi I would like to take this issue :) |
Hi @daschaa - hope you are doing well. I wanted to check in with you to see if you needed any kind of support from our side or if you were still working on this. If not, no issue at all, we understand life happens 😄 |
@dreamorosi Hey Andrea, unfortunately due to private reasons I was not able to work on OSS. I forgot to put in a comment, sorry about that! |
This issue is now closed. Please be mindful that future comments are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so. |
This is now released under v2.8.0 version! |
Use case
I'd like to be able to create/update a secret parameter's value.
Solution/User Experience
const ssmClient = new SSMClient({ region: "us-west-2" })
const putTokenCommand = new PutParameterCommand({
Name: secretName,
Type: "SecureString",
DataType: "text",
Value: JSON.stringify(secret),
Overwrite: true,
});
Alternative solutions
Acknowledgment
Future readers
Please react with 👍 and your use case to help us understand customer demand.
The text was updated successfully, but these errors were encountered: