0.2.1 • Published 1 year ago

@dsmrt/axiom-aws-sdk v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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

1 year ago

0.1.0

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.8-alpha.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.5-0

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.1

2 years ago