score:4

Accepted answer

the error states that credentials are missing so it is an authentication issue, you can try setting the accesskeyid and secretaccesskey or the credentials fields directly on the ssm constructor.

so simply maintain your code as is, just make the following change:

// from
const ssm = new aws.ssm({ region: 'eu-west-1' });

// to
const ssm = new aws.ssm({
    region: 'eu-west-1',
    accesskeyid: 'your-access-key',
    secretaccesskey: 'your-secret-key'
});

// or to
const ssm = new aws.ssm({
    region: 'eu-west-1',
    credentials: {
        accesskeyid: 'your-access-key',
        secretaccesskey: 'your-secret-key'
    }
});

Related Query

More Query from same tag