-
Notifications
You must be signed in to change notification settings - Fork 628
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(lambda): bump @aws-sdk/client-ssm from 3.321.1 to 3.350.0 in /lam…
…bdas (#3319) * fix(lambda): bump @aws-sdk/client-ssm in /lambdas Bumps [@aws-sdk/client-ssm](https://github.com/aws/aws-sdk-js-v3/tree/HEAD/clients/client-ssm) from 3.321.1 to 3.350.0. - [Release notes](https://github.com/aws/aws-sdk-js-v3/releases) - [Changelog](https://github.com/aws/aws-sdk-js-v3/blob/main/clients/client-ssm/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-js-v3/commits/v3.350.0/clients/client-ssm) --- updated-dependencies: - dependency-name: "@aws-sdk/client-ssm" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * fix: dependabot updates. * fix: tests. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Navdeep Gupta <[email protected]>
- Loading branch information
1 parent
d0e8960
commit 97d5c73
Showing
11 changed files
with
815 additions
and
702 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
import { SSM } from '@aws-sdk/client-ssm'; | ||
import { GetParameterCommand, PutParameterCommand, SSMClient } from '@aws-sdk/client-ssm'; | ||
|
||
export async function getParameterValue(parameter_name: string): Promise<string> { | ||
const client = new SSM({ region: process.env.AWS_REGION }); | ||
return (await client.getParameter({ Name: parameter_name, WithDecryption: true })).Parameter?.Value as string; | ||
export async function getParameter(parameter_name: string): Promise<string> { | ||
const client = new SSMClient({ region: process.env.AWS_REGION }); | ||
return (await client.send(new GetParameterCommand({ Name: parameter_name, WithDecryption: true }))).Parameter | ||
?.Value as string; | ||
} | ||
|
||
export async function putParameter(parameter_name: string, parameter_value: string, secure: boolean): Promise<void> { | ||
const client = new SSMClient({ region: process.env.AWS_REGION }); | ||
await client.send( | ||
new PutParameterCommand({ | ||
Name: parameter_name, | ||
Value: parameter_value, | ||
Type: secure ? 'SecureString' : 'String', | ||
}), | ||
); | ||
} |
Oops, something went wrong.