Skip to main content

Creates an IAM Access Key for a provided IAM User and stores the result in an SSM SecureString Parameter

Project description

cdk-ssm-secure-iam-access-key

Creates an IAM Access Key for a provided IAM User and stores the result in an SSM SecureString Parameter

NPM Package

View on Construct Hub

Installation

npm i -D cdk-ssm-secure-iam-access-key

Usage

        const user = new iam.User(this, "SMTPUser");

        user.addToPolicy(
            new iam.PolicyStatement({
                effect: iam.Effect.ALLOW,
                actions: ["ses:SendRawEmail"],
                resources: ["*"],
            })
        );

        new SSMSecureIAMAccessKey(this, "SMTPUserCredentials", {
            parameterName: "/smtpCredentials",
            user,
        });

        // JSON.stringified {accessKeyId: "...", secretAccessKey: "..."}
        return ssm.StringParameter.fromSecureStringParameterAttributes(
            this,
            "SMTPUserCredentialsSSM",
            {
                parameterName: "/smtpCredentials",
            }
        );

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdk-ssm-secure-iam-access-key-0.0.8.tar.gz (1.3 MB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page