release-engineering / exodus-lambda Goto Github PK
View Code? Open in Web Editor NEWAWS Lambda functions for Red Hat's Content Delivery Network
License: GNU General Public License v3.0
AWS Lambda functions for Red Hat's Content Delivery Network
License: GNU General Public License v3.0
To deploy a lambda function one must copy the function directory, zip the contents of the directory, deploy the .zip to AWS, and clean up the copied directory.
This process should be automated using a small script in either bash or Python.
The steps described must be manually completed.
A bash or Python script exists to perform the deployment of a function within cdn-lambda/cdn_lambda/functions/ with as few arguments as possible.
Automate much of the manual work required to deploy a lambda function.
Deployment steps:
Copy desired function directory to working directory
cp -R src-open/cdn-lambda/cdn_lambda/functions/map_to_s3/ .
Enter the directory and zip the contents
cd map_to_s3 && zip deployment.zip *
Create the function in AWS
aws lambda create-function --function-name map_to_s3 --runtime python3.7 --zip-file fileb://deployment.zip --handler map_to_s3.lambda_handler --role arn:aws:iam::XXXXXXX --region DESIRED-AWS-REGION
Or update an existing function
aws lambda update-function-code --function-name map_to_s3_2 --zip-file fileb://deployment.zip --region DESIRED-AWS-REGION
Clean up deployed function directory
cd .. && rm -rf map_to_s3
Currently there is only one lambda function, in lambda_functions.py.
Based on https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html, it doesn't seem possible to store multiple lambda functions in a single Python module.
Each lambda function should therefore live in its own, uniquely named module.
Change the name of the existing lambda function and test modules to set the correct precedent for naming.
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
The uri in the request passed to CloudfFont should begin with a '/'
https://github.com/release-engineering/cdn-lambda/blob/master/cdn_lambda/functions/map_to_s3.py#L44
Attempt to access a valid path that exists in the ddb + object mappings table.
ERROR Validation error: Lambda function result validation failed, the specified URI is in an invalid format, uri must start with '/'.
User receives a "502" error from CloudFront after attempting to access cloudfront-domain.cloudfront.net objectkey):
The Lambda function result failed validation: The specified URI is in an invalid format.
The uri in the request that is passed to CloudFront begins with '/'. The user is redirected to object key (i.e., attempts to access cloudfront-domain.cloudfront.net/objectkey))
Lambda@Edge, Python3.7
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
Lambda@Edge functions does not support environment variables, yet map_to_s3 depends on DB_TABLE_NAME and DB_TABLE_REGION. Another method of injecting these variables must be implemented.
Attempt to deploy map_to_s3 function with any environment variables.
Function creation is rejected by AWS Lambda
Function creation is successful and the function can access determine the correct table to query for mapping.
Lambda@Edge, Python3.7
Versioning for the CDN s3 bucket, configured in exodus-storage.yaml, is unnecessarily enabled.
n/a
Versioning is enabled for CDN bucket
Versioning is disabled for CDN bucket
n/a
The documentation for this repository, found in https://github.com/release-engineering/cdn-lambda/tree/master/docs and published at https://release-engineering.github.io/cdn-lambda/, should be improved to list all the available lambda functions and instructions for deploying them.
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
Dependabot couldn't authenticate with https://pypi.python.org/simple/.
You can provide authentication details in your Dependabot dashboard by clicking into the account menu (in the top right) and selecting 'Config variables'.
Other release-engineering/content-delivery projects have issue templates, i.e., https://github.com/release-engineering/pubtools-pulplib/tree/master/.github/ISSUE_TEMPLATE.
Let's add templates like these to this repository.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.