Releases: cjkent/osiris
v0.11.0
- Support for deploying to a VPC (see here)
- Keep-alive runs on deployment so lambdas are available immediately
This build includes a breaking change. The file root.template
is now mandatory.
If your application is already using root.template
then no changes are required.
If your application is not using root.template
then rename the file src/main/cloudformation/root.template.example
to root.template
.
v0.10.2
v0.10.1
v0.10.0
Adds keep-alive support.
v0.9.1
v0.9.0
New features:
- Gradle plugins to:
- Generate the initial project
- Build the project artifacts, generate the configuration and deploy to AWS
- Optional environment name parameter to allow deployment of multiple separate stacks
- Optional AWS profile parameter to allow deployment to multiple accounts
- Optional bucket name prefix to avoid name clashes
- Support for binary payloads
Bug fixes:
- Changing static files doesn't affect existing stages until redeployment
- Stage variables correctly passed to the lambda on
Request
This release contains several breaking changes:
- The package of all Osiris projects has changed from
io.github.cjkent.osiris
tows.osiris
. A global find-and-replace should fix everything - Maven configuration has been simplified. To fix:
- Remove
osiris-maven-plugin
from the pom of the root project - Remove
osiris-maven-plugin
from the pom of thelocal-server
project - Remove the
generate-lambda
execution from theosiris-maven-plugin
in thecore
project - Add the following block to the
osiris-maven-plugin
in thecore
project, replacingcom.example
with the package of your application
- Remove
<configuration>
<rootPackage>com.example</rootPackage>
</configuration>
- Code generation that was previously done on every build is now done when the project is first created. This means the generated code will be missing from existing projects that upgrade to 0.9.0. To fix this:
- Generate a new project with the same group and artifact IDs and package as your existing project
- Copy the directory
core/src/main/kotlin/${package}/core/generated
to your existing project
v0.8.0
- Update to AWS log4j2
- Support OPTIONS method
- Support PATCH method
- Added
ContentType
to help handlingcharset
inContent-Type
header - Fix #78 - deployment fails if a resource ID is reused for a different path
This release contains a breaking change. ContentTypes
has been renamed to MimeTypes
.
v0.7.1
v0.7.0
- AWS config has moved from the Maven plugin config to the code
- Any templates parameters passed to the generated template are exposed to the code as environment variables
- An API can be defined across multiple files
- Helper functions for adding headers to responses
Version 0.7.0 requires you to have an AWS config file (~/.aws/config
) specifying the AWS region. This was not required in earlier versions. See here.
This release contains two major breaking changes.
AWS Config is in the code
The ApplicationConfig
class defines how the code will be deployed to AWS, replacing the parameters in the configuration for the Osiris Maven plugin. The configuration will be something like this:
val config = ApplicationConfig(
applicationName = "my-project",
lambdaMemorySizeMb = 512,
lambdaTimeout = Duration.ofSeconds(10),
stages = listOf(
Stage(
name = "dev",
description = "Development stage",
deployOnUpdate = true
)
)
)
Osiris requires a public property named config
of type ApplicationConfig
to be declared in the core
package of the project. The normal place to put it is in a file named Config.kt
.
This can be created by hand when migrating from an earlier version of Osiris. Alternatively a new project can be generated and Config.kt
copied into the existing project.
The Maven config of the Osiris plugin must also be updated when moving to 0.7.0 from an earlier version. The config now requires three parameters:
apiProperty
componentsFunction
configProperty
The first two of these are unchanged and can be left as they are. The configProperty
parameter should have the same value as apiProperty
, but with ::api
replaced with ::config
. All other elements in the configuration
element should be deleted.
Again, a new project can be generated and the existing pom.xml
can be replaced with the generated one.
The api
function signature has changed
The api
function is the entry point for defining an API. The signature has changed. It no longer takes the KClass
of the ComponentsProvider
subtype as a parameter. Instead it has a type parameter for the type of the ComponentsProvider
subtype.
Existing code:
val api = api(MyComponents::class) {
...
}
Osiris 0.7.0 code:
val api = api<MyComponents> {
...
}
v0.6.1
groupId
is no longer used as the prefix of the S3 bucket names. This led to bucket names being generated that were longer than the maximum of 63 characters.
This is a breaking change for projects that use root.template
. The line like
TemplateURL: !Sub "https://s3-${AWS::Region}.amazonaws.com/com.example.my-project.code/my-project.template"
should be replaced with
TemplateURL: !Sub "https://s3-${AWS::Region}.amazonaws.com/my-project.code/my-project.template"