Open voco-dev opened 1 year ago
Thanks for reporting @voco-dev ! We'll take a look into how this could be supported.
To make sure we're getting as close to your use case as possible, do you have a snippet (with any sensitive info redacted) from your lambda that illustrates how you're reading from s3 storage?
I was pretty much following the documentation. My code just retrieves the file from s3 using axios
... const fileUrl = this.getS3PreSignedUrl("Media/menu-data.json"); try { const res = await Axios.get(fileUrl); ...
the example code from hello world util.js:
const s3SigV4Client = new AWS.S3({ signatureVersion: 'v4', region: process.env.S3_PERSISTENCE_REGION });
module.exports.getS3PreSignedUrl = function getS3PreSignedUrl(s3ObjectKey) {
const bucketName = process.env.S3_PERSISTENCE_BUCKET;
const s3PreSignedUrl = s3SigV4Client.getSignedUrl('getObject', {
Bucket: bucketName,
Key: s3ObjectKey,
Expires: 60*1 // the Expires is capped for 1 minute
});
console.log(`Util.s3PreSignedUrl: ${s3ObjectKey} URL ${s3PreSignedUrl}`);
return s3PreSignedUrl;
}
error is:
Thanks for the additional info!
Desktop (please complete the following information):
Question persistent storage not working with local debugging.
when i run the skill in the console it works fine. i download the alexa-hosted-skill code, start the debugger with no issues. when i invoke the skill with an intent that tries to read from the s3 storage i get the following error: