The solution setup is divided into two sections, one for the AWS setup and one for the Axis camera setup.
The AWS services and camera configurations needed in order to send an image to S3 is managed via an example application that can be downloaded from Axis Communications GitHub repository.
The application consists of the following AWS resources:
- API Gateway
- Lambda functions
- Secret stored in Secrets Manager
- S3 bucket
As the camera is not able to sign requests using AWS Signature Version 4 we need to include a Lambda function to handle this step. Rather than sending images directly from the Axis camera to AWS S3 we instead send them to an API Gateway. The API Gateway delegates authorization to a Lambda authorizer that compares the provided access token to an access token stored in Secrets Manager. If the provided access token is deemed valid the API Gateway forwards the request to a Lambda function that proceeds with uploading the provided image to an AWS S3 bucket.