Sparta v1.8.0 Release Notes
-
- 💥 :warning: BREAKING
- Renamed
archetype.CloudWatchLogsReactor
toarchetype.CloudWatchReactor
- Also changed
OnLogMessage
toOnCloudWatchMessage
- I consistently forget the fact that CloudWatch is more than logs
- Moved the internal
cloudwatchlogs
package to thecloudwatch/logs
import path - Renamed fluent typenames in github.com/mweagle/Sparta/aws/iam/builder to support Principal-based builders
- Renamed
step.NewTaskState
tostep.NewLambdaTaskState
to enable type specific Step function services. - Simplified versioning Lambda resource so that the Lambda::Version resource is orphaned (via DeletionPolicy) rather than the prior implementation, which fetched all versions from the provisioned template and accumulated them over time.
- This also obsoleted the
ContextKeyLambdaVersions
constant
- Renamed
:checkered_flag: CHANGES
- More documentation
- Added Step function service integrations
- See the SpartaStepServicefull project for an example of a service that:
- Provisions no Lambda functions
- Dockerizes itself
- Pushes that image to ECR
- Uses the resulting ECR Image URL as a Fargate Task in a Step function:
- Added github.com/mweagle/Sparta/aws/iam/builder.IAMBuilder::ForPrincipals fluent builder. Example usage:
"Statement": []spartaIAM.PolicyStatement{ iamBuilder.Allow("sts:AssumeRole"). ForPrincipals("states.amazonaws.com"). ToPolicyStatement(),
- Upgraded to
docker login --password-stdin
for local authentication. Previously useddocker login --password
. Example:
INFO[0005] df64d3292fd6: Preparing INFO[0006] denied: Your Authorization Token has expired. Please run 'aws ecr get-login --no-include-email' to fetch a new one. INFO[0006] ECR push failed - reauthorizing Error="exit status 1" INFO[0006] Login Succeeded INFO[0006] The push refers to repository [123412341234.dkr.ecr.us-west-2.amazonaws.com/argh]
- See the Docker docs
- Include
docker -v
output in log when calling BuildDockerImage - Added
StateMachineNamedDecorator(stepFunctionResourceName)
to supply the name of the Step function - Migrated all API-Gateway integration mappings to use the mapping override support in VTL.
- This reduces the number of API-Gateway RegExp-based integration mappings and relies on a Lambda function returning a shape that matches the default application/json expectations:
{ "code" : int, "body" : ..., "headers": { "x-lowercase-header" : "foo", } }
- The default shape can be customized by providing custom mapping templates to the IntegrationResponses
- rest.MethodHandler:Headers has been deprecated.
- Moving all header management to VTL eliminated the need to explicitly declare headers.
- Added
spartaDecorators.PublishAllResourceOutputs(cfResourceName, gocf.ResourceProperties)
which adds all the associated resourceRef
andAtt
values to the Stack Outputs - The set of
Att
values is extracted from the CloudFormation Resource Specification via the go-cloudformation project.
🛠 :bug: FIXED
- API Gateway custom headers were not being properly returned
- RegisterLambdaUtilizationMetricPublisher Name ref obsolete
- 💥 :warning: BREAKING