j40-cejst-2/infrastructure
dependabot[bot] d4765cc581
Bump tar from 6.1.6 to 6.1.11 in /infrastructure (#584)
Bumps [tar](https://github.com/npm/node-tar) from 6.1.6 to 6.1.11.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.1.6...v6.1.11)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-03 14:03:50 -04:00
..
functions/detect-changes-for-worker Fargate Serverless Workers for Census Data Enrichment and Tile Generation (#230) 2021-06-30 09:29:01 -04:00
conditions.yml Fargate Serverless Workers for Census Data Enrichment and Tile Generation (#230) 2021-06-30 09:29:01 -04:00
environment.yml Fargate Serverless Workers for Census Data Enrichment and Tile Generation (#230) 2021-06-30 09:29:01 -04:00
functions.yml Fargate Serverless Workers for Census Data Enrichment and Tile Generation (#230) 2021-06-30 09:29:01 -04:00
package-lock.json Bump tar from 6.1.6 to 6.1.11 in /infrastructure (#584) 2021-09-03 14:03:50 -04:00
package.json Fargate Serverless Workers for Census Data Enrichment and Tile Generation (#230) 2021-06-30 09:29:01 -04:00
README.md Fargate Serverless Workers for Census Data Enrichment and Tile Generation (#230) 2021-06-30 09:29:01 -04:00
resources-cloudfront.yml Fargate Serverless Workers for Census Data Enrichment and Tile Generation (#230) 2021-06-30 09:29:01 -04:00
resources-ecs.yml Fargate Serverless Workers for Census Data Enrichment and Tile Generation (#230) 2021-06-30 09:29:01 -04:00
resources-route53.yml Fargate Serverless Workers for Census Data Enrichment and Tile Generation (#230) 2021-06-30 09:29:01 -04:00
resources-s3.yml Fargate Serverless Workers for Census Data Enrichment and Tile Generation (#230) 2021-06-30 09:29:01 -04:00
serverless.yml Fargate Serverless Workers for Census Data Enrichment and Tile Generation (#230) 2021-06-30 09:29:01 -04:00

create acm certificate

This only needs to be run once for the sit environment. stg and prd, we're assuming some other certificate arn will be used

npx serverless create-cert 

you'll have to grab the arn of the certificate from the log output or go into the console to get it, looks like the plugin doesn't work any more. Set CLOUDFRONT_CERTIFICATE_ARN in sit to that value

deploy

sls deploy --aws-profile geoplatform --stage sit --verbose

If it's the first time deploying, you'll have to create a dns entry that points to the cloudfront distribution.

testing

The examples can be run several different ways

local

The package.json file incluses several examples to run against the local source code. The actual tasks will execute within AWS, so an AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY must be set in the test.env file.

$ cd ./functions/detect-changes-for-worker
$ npm run test:gdal

lambda invoke

The deployed lambda functions can be directly invoked with the serverless invoke function.

$ cat ./functions/detect-changes-for-worker/events/gdal.json | sls invoke -s sit -f DetectChangesForWorker

New event files can be created to perform one-off data processes.