This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict' | |
| const chromium = require('chrome-aws-lambda'); | |
| const AWS = require('aws-sdk') | |
| const s3 = new AWS.S3(); | |
| exports.handler = async (event, context, callback) => { | |
| let browser = null | |
| try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service: pdf-service | |
| plugins: | |
| - serverless-apigw-binary | |
| package: | |
| exclude: | |
| - pdf_generation/** | |
| layers: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="main-content"> | |
| <div class="container-fluid"> | |
| <div id="dashboardContainer" style="height: 100% !important; width: 100% !important;"></div> | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| getDashboardUrl(email) { | |
| const url = environment.GET_DASHBOARD_URL + `?email=${email}`; | |
| return this.http.get(url); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.auth.getDashboardUrl() | |
| .subscribe(url => { | |
| console.log(url['payload'].EmbedUrl); | |
| const embedUrl = url['payload'].EmbedUrl; | |
| const options = { | |
| url: embedUrl, | |
| container: document.getElementById('dashboardContainer'), | |
| parameters: { | |
| country: 'Ecuador' | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict' | |
| // IMPORTANT: Replace environment variables with your current values | |
| const aws = require('aws-sdk') | |
| aws.config.region = process.env.REGION | |
| const sts = new aws.STS({apiVersion: '2011-06-15'}) | |
| module.exports.handler = (event, context, callback) => { | |
| console.log('User email', event.queryStringParameters.email) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service: quicksight-resolver-service | |
| app: quicksight-resolver-app | |
| # TIP: I prefer to use a secret file for sensitive information as a security practice | |
| custom: | |
| secrets: ${file(./secrets.json)} | |
| quickSightEmbedRoleArn: | |
| Fn::GetAtt: [quickSightEmbedRole, Arn] | |
| provider: |