Lambda functions associated with the API Gateway endpoints will now process uploaded images and return data about those uploaded images.
Each Lambda function servers a specific purpose. Upload
accepts an image file and writes it to an S3 bucket. The List
function returns a JSON array of all the uploaded files.
- S3
- IAM
The GET /api/images
endpoint is not functioning. Compare the List
Lambda function resource to the Upload
functionn and add the missing elements required to grant S3 read permissions.
Reference the SAM Policy Templates documentation to find the appropriate role.
As an additional challenge make use of SAM's Globals
feature.
Next Module: Image Processing
Once instructed, move on to the next module and update your repository with the provided files (overwrite existing files and your changes).