Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
core
local-server
README.md
build.gradle
pom.xml
settings.gradle

README.md

Resources Example Project

This project demonstrates creating AWS resources in an Osiris project and using them from the code that handles HTTP requests.

An SQS message queue is created in the file root.template in the resource Queue.

The standard LambdaPolicy block has been extended to add permissions for the queue. The policy grants the generated lambda permissions to send, receive and delete messages on the queue.

The URL of the SQS queue is passed to the template generated by Osiris. The generated template is referenced by the ApiStack block. It has a parameter QueueUrl which is a reference to the queue.

An environment variable named QueueUrl is created containing the URL. Any parameters to the resource referencing the generated template are automatically exposed to the code as environment variables.

The class ResourcesExampleComponents reads the QueueUrl environment variable and exposes it as a property that is used by the handler code.

You can’t perform that action at this time.