0.2.1 • Published 2 months ago

@dsmrt/axiom-aws-sdk v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Axiom - AWS SDK

An AWS focused config manager

This package focuses on AWS api calls while using the axiom cli

Features

  • Secret management with SSM Parameters (secure strings)

Getting Started

Install the CLI

npm install @dsmrt/axiom-aws-sdk

AWS SDK Usage

AWS IAM Permissions

# to use this, you need to give the lambda function permission to the
# ** CloudFormation Example **
 Resources:
   LambdaPolicies:
     Type: AWS::IAM::Policy
     Properties:
       PolicyName: LambdaRole
       PolicyDocument:
         Statement:
         - Effect: Allow
           Action:
           - "ssm:GetParameters"
           - "ssm:GetParametersByPath"
           Resource: !Sub 'arn:aws:ssm:*:*:parameter/${PARAMETER_PATH}/*'
# OR 
 Resources:
   LambdaPolicies:
     Type: AWS::IAM::Policy
     Properties:
       PolicyName: LambdaRole
       PolicyDocument:
         Statement:
         - Effect: Allow
           Action:
           - "ssm:PutParameter" # you'll need this to put the parameters as well
           - "ssm:GetParameters"
           - "ssm:GetParametersByPath"
           Resource:
           - ${name1}
           - ${name2}
           - ${name3

AWS SDK Examples

    import { ParameterCollection } from "@dsmrt/axiom-aws-sdk";
    import { SSMClient, Parameter } from "@aws-sdk/client-ssm";

    const collection = new ParameterCollection(
      `/my-app/dev/`,
      new SSMClient({
        region: "us-east-1",
      }),
    );

    const params = await collection.get();

    params.forEach((parameter: Parameter) => {
        console.log(parameter.Name)
        console.log(parameter.Value)
    });

Acknowledgements

0.2.1

2 months ago

0.1.0

4 months ago

0.2.0

4 months ago

0.1.1

4 months ago

0.0.10

4 months ago

0.0.11

4 months ago

0.0.8-alpha.0

4 months ago

0.0.9

4 months ago

0.0.8

4 months ago

0.0.3

4 months ago

0.0.2

4 months ago

0.0.5-0

4 months ago

0.0.5

4 months ago

0.0.4

4 months ago

0.0.1

4 months ago