Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,19 @@
"trailingCommas": "es5"
}
},
"markdown": {
"formatter": {
"enabled": false
},
"linter": {
"enabled": false
}
},
"yaml": {
"formatter": {
"enabled": true
}
},
"files": {
"includes": [
"**",
Expand Down
6 changes: 3 additions & 3 deletions examples/snippets/batch/templates/sam/dynamodb.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AWSTemplateFormatVersion: '2010-09-09'
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: partial batch response sample

Expand All @@ -22,9 +22,9 @@ Resources:
Policies:
# Lambda Destinations require additional permissions
# to send failure records from Kinesis/DynamoDB
- Version: '2012-10-17'
- Version: "2012-10-17"
Statement:
Effect: 'Allow'
Effect: "Allow"
Action:
- sqs:GetQueueAttributes
- sqs:GetQueueUrl
Expand Down
6 changes: 3 additions & 3 deletions examples/snippets/batch/templates/sam/kinesis.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AWSTemplateFormatVersion: '2010-09-09'
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: partial batch response sample

Expand All @@ -22,9 +22,9 @@ Resources:
Policies:
# Lambda Destinations require additional permissions
# to send failure records to DLQ from Kinesis/DynamoDB
- Version: '2012-10-17'
- Version: "2012-10-17"
Statement:
Effect: 'Allow'
Effect: "Allow"
Action:
- sqs:GetQueueAttributes
- sqs:GetQueueUrl
Expand Down
2 changes: 1 addition & 1 deletion examples/snippets/batch/templates/sam/sqs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AWSTemplateFormatVersion: '2010-09-09'
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: partial batch response sample

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AWSTemplateFormatVersion: '2010-09-09'
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31

Globals:
Expand Down Expand Up @@ -61,7 +61,7 @@ Resources:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Expand All @@ -70,7 +70,7 @@ Resources:
Policies:
- PolicyName: LambdaInvokePolicy
PolicyDocument:
Version: '2012-10-17'
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
Expand All @@ -81,8 +81,8 @@ Resources:
Type: AWS::AppSync::DataSource
Properties:
ApiId: !GetAtt WebsocketAPI.ApiId
LambdaConfig:
LambdaConfig:
LambdaFunctionArn: !GetAtt HelloWorldFunction.Arn
Name: powertools_lambda
ServiceRoleArn: !GetAtt DataSourceIAMRole.Arn
Type: AWS_LAMBDA
Type: AWS_LAMBDA
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@ Outputs:
Value: !GetAtt TodosFunction.Arn

TodosApi:
Value: !GetAtt TodosApi.GraphQLUrl
Value: !GetAtt TodosApi.GraphQLUrl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AWSTemplateFormatVersion: '2010-09-09'
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31

Globals:
Expand All @@ -17,10 +17,10 @@ Resources:
AirlineAgentRole:
Type: AWS::IAM::Role
Properties:
RoleName: !Sub '${AWS::StackName}-AirlineAgentRole'
Description: 'Role for Bedrock Airline agent'
RoleName: !Sub "${AWS::StackName}-AirlineAgentRole"
Description: "Role for Bedrock Airline agent"
AssumeRolePolicyDocument:
Version: '2012-10-17'
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Expand All @@ -29,30 +29,30 @@ Resources:
Policies:
- PolicyName: bedrock
PolicyDocument:
Version: '2012-10-17'
Version: "2012-10-17"
Statement:
- Effect: Allow
Action: 'bedrock:*'
Action: "bedrock:*"
Resource:
- !Sub 'arn:aws:bedrock:us-*::foundation-model/*'
- !Sub 'arn:aws:bedrock:us-*:*:inference-profile/*'
- !Sub "arn:aws:bedrock:us-*::foundation-model/*"
- !Sub "arn:aws:bedrock:us-*:*:inference-profile/*"

BedrockAgentInvokePermission:
Type: AWS::Lambda::Permission
Properties:
FunctionName: !Ref HelloWorldFunction
Action: lambda:InvokeFunction
Principal: bedrock.amazonaws.com
SourceAccount: !Ref 'AWS::AccountId'
SourceArn: !Sub 'arn:aws:bedrock:${AWS::Region}:${AWS::AccountId}:agent/${AirlineAgent}'
SourceAccount: !Ref "AWS::AccountId"
SourceArn: !Sub "arn:aws:bedrock:${AWS::Region}:${AWS::AccountId}:agent/${AirlineAgent}"

# Bedrock Agent
AirlineAgent:
Type: AWS::Bedrock::Agent
Properties:
AgentName: AirlineAgent
Description: 'A simple Airline agent'
FoundationModel: !Sub 'arn:aws:bedrock:us-west-2:${AWS::AccountId}:inference-profile/us.amazon.nova-pro-v1:0'
Description: "A simple Airline agent"
FoundationModel: !Sub "arn:aws:bedrock:us-west-2:${AWS::AccountId}:inference-profile/us.amazon.nova-pro-v1:0"
Instruction: |
You are an airport traffic control agent. You will be given a city name and you will return the airport code for that city.
AgentResourceRoleArn: !GetAtt AirlineAgentRole.Arn
Expand All @@ -64,9 +64,9 @@ Resources:
FunctionSchema:
Functions:
- Name: getAirportCodeForCity
Description: 'Get the airport code for a given city'
Description: "Get the airport code for a given city"
Parameters:
city:
Type: string
Description: 'The name of the city to get the airport code for'
Description: "The name of the city to get the airport code for"
Required: true
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ Resources:
Path: /{proxy+}
Method: ANY
GetAllTodos:
Type: HttpApi
Properties:
Path: /todos
Method: GET
Type: HttpApi
Properties:
Path: /todos
Method: GET
GetTodoById:
Type: HttpApi
Properties:
Path: /todos/{todo_id}
Method: GET
Type: HttpApi
Properties:
Path: /todos/{todo_id}
Method: GET
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ Resources:
Path: /{proxy+} # Send requests on any path to the lambda function
Method: ANY # Send requests using any http method to the lambda function
GetAllTodos:
Type: Api
Properties:
Path: /todos
Method: GET
Type: Api
Properties:
Path: /todos
Method: GET
GetTodoById:
Type: Api
Properties:
Path: /todos/{todo_id}
Method: GET
Type: Api
Properties:
Path: /todos/{todo_id}
Method: GET
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Resources:
CodeUri: hello_world
Description: API handler function
FunctionUrlConfig:
AuthType: NONE # AWS_IAM for added security beyond sample documentation
AuthType: NONE # AWS_IAM for added security beyond sample documentation
2 changes: 1 addition & 1 deletion examples/snippets/idempotency/templates/cacheSam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Resources:
Environment:
Variables:
CACHE_ENDPOINT: !GetAtt CacheIdempotency.Endpoint.Address
CACHE_PORT: !GetAtt CacheIdempotency.Endpoint.Port
CACHE_PORT: !GetAtt CacheIdempotency.Endpoint.Port
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
Resources:
OrderProcessingFunction:
Type: AWS::Serverless::Function
Type: AWS::Serverless::Function
Properties:
Runtime: nodejs24.x
Handler: index.js
Events:
KafkaEvent:
Type: MSK
Properties:
Runtime: nodejs24.x
Handler: index.js
Events:
KafkaEvent:
Type: MSK
Properties:
Stream: !GetAtt OrdersMSKCluster.Arn
Topics:
- order-events
- payment-events
# Configuration for optimal throughput/latency balance
BatchSize: 100
MaximumBatchingWindowInSeconds: 5
StartingPosition: LATEST
# Enable partial batch success reporting
FunctionResponseTypes:
- ReportBatchItemFailures
Stream: !GetAtt OrdersMSKCluster.Arn
Topics:
- order-events
- payment-events
# Configuration for optimal throughput/latency balance
BatchSize: 100
MaximumBatchingWindowInSeconds: 5
StartingPosition: LATEST
# Enable partial batch success reporting
FunctionResponseTypes:
- ReportBatchItemFailures
4 changes: 2 additions & 2 deletions examples/snippets/kafka/templates/gettingStartedWithMsk.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AWSTemplateFormatVersion: '2010-09-09'
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Resources:
KafkaConsumerFunction:
Expand All @@ -17,4 +17,4 @@ Resources:
- my-topic-1
- my-topic-2
Policies:
- AWSLambdaMSKExecutionRole
- AWSLambdaMSKExecutionRole
Loading
Loading