1 Answer
- Newest
- Most votes
- Most comments
2
const AWS = require('aws-sdk');
exports.handler = async (event) => { // Configure AWS SDK const kms = new AWS.KMS({ accessKeyId: process.env.AWS_ACCESS_KEY_ID, secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, region: 'us-east-1' // Set your region });
Please create the configuration.env as file and mention the variable on that file like AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. Hope this work for you
answered 3 months ago
Relevant content
- asked 2 years ago
- asked 5 years ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
That code contains aws sdk for JS v2. I am using v3 sdk. specifically this is the package that i am using @aws-sdk/client-kms. Could you please share how to do this in aws sdk v3