npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

serverless-create-ssm-secrets-plugin

v1.0.0

Published

A Serverless Framework plugin to create and update secrets in AWS SSM.

Downloads

5

Readme

serverless-create-ssm-secrets-plugin

npm license downloads

Descrição

serverless-create-ssm-secrets-plugin é um plugin para o Serverless Framework que facilita a criação e atualização de secrets no AWS SSM (Systems Manager Parameter Store). O plugin permite a configuração de secrets diretamente no arquivo serverless.yml, com suporte para valores criptografados usando o algoritmo AES-192-CBC.

Instalação

Você pode instalar o plugin via npm:

npm install serverless-create-ssm-secrets-plugin --save-dev

Uso

Adicione o plugin ao seu arquivo serverless.yml:

service: my-service

plugins:
  - serverless-create-ssm-secrets-plugin

custom:
  createSsmSecrets: 
    decryptionKey: "<aes-key>"
    prefix: /my-service/api/
    secrets: 
      secret_key_1: 
        encrypted: true
        value: "encrypted-text-secret"
      secret_key_2:
        encrypted: false 
        value: "plain-text-secret"

Configurações

  • decryptionKey (opcional): Chave de criptografia de 192 bits (48 caracteres hexadecimais) utilizada para descriptografar secrets marcadas como encrypted: true.
  • prefix (opcional): Prefixo que será adicionado ao nome de cada secret no SSM.
  • secrets (obrigatório): Um objeto que contém os secrets a serem criados ou atualizados no SSM.

Exemplo de Uso

Se você definir o serverless.yml da seguinte forma:

custom:
  createSsmSecrets: 
    decryptionKey: "c95334e0aed31bd815a129ce226d93e15a443e69dce96c2d"
    prefix: /my-service/api/
    secrets: 
      database_password: 
        encrypted: true
        value: "51b76fce4cdc1e65da3a403dcbc04e73:c36865779fac550ea258850d304dd3d709b036cefdb1a96e21b427e54fb211dc3b6bdf5a603c4ce7bd0834425ab9d90b"
      api_key:
        encrypted: false 
        value: "plain-text-api-key"

O plugin criará ou atualizará os seguintes parâmetros no AWS SSM:

  • /my-service/api/database_password (descriptografado)
  • /my-service/api/api_key (em texto simples)

Requisitos

  • O plugin espera que as seguintes variáveis de ambiente estejam configuradas:
    • AWS_ACCESS_KEY_ID
    • AWS_SECRET_ACCESS_KEY
    • AWS_REGION
    • AWS_ENDPOINT (necessário se você estiver usando LocalStack)

Avisos

  • Chave de Criptografia: Se qualquer secret estiver marcado como encrypted: true, o campo decryptionKey deve ser fornecido.
  • Permissões do IAM: Certifique-se de que as credenciais AWS fornecidas tenham permissões adequadas para acessar e modificar os parâmetros no SSM.

Contribuição

Contribuições são bem-vindas! Sinta-se à vontade para abrir issues e pull requests para melhorias ou correções.

Licença

Este projeto está licenciado sob a licença MIT - veja o arquivo LICENSE para mais detalhes.