hc99's picture
Add files using upload-large-folder tool
d8ad0fd verified
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Resources:
RedisServerlessIdempotency:
Type: AWS::ElastiCache::ServerlessCache
Properties:
Engine: redis
ServerlessCacheName: redis-cache
SecurityGroupIds: # (1)!
- security-{your_sg_id}
SubnetIds:
- subnet-{your_subnet_id_1}
- subnet-{your_subnet_id_2}
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
Runtime: python3.12
Handler: app.py
VpcConfig: # (1)!
SecurityGroupIds:
- security-{your_sg_id}
SubnetIds:
- subnet-{your_subnet_id_1}
- subnet-{your_subnet_id_2}
Environment:
Variables:
POWERTOOLS_SERVICE_NAME: sample
REDIS_HOST: !GetAtt RedisServerlessIdempotency.Endpoint.Address
REDIS_PORT: !GetAtt RedisServerlessIdempotency.Endpoint.Port