hello, i am not able to Output
my custom Resources
, this is what I have:
resources:
- Resources:
S3BucketCsv:
Type: AWS::S3::Bucket
Properties:
BucketName: ${file(./config.yml):${opt:stage}.UPLOADS_BUCKET}
NotificationConfiguration:
LambdaConfigurations:
- Event: 's3:ObjectCreated:*'
Function:
"Fn::GetAtt":
- InitLambdaFunction
- Arn
LifecycleConfiguration:
Rules:
- Id: "Delayed csv expiration"
Status: "Enabled"
TagFilters:
- Key: "deleted-csv"
Value: "true"
ExpirationInDays: 1
CsvBucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket: ${file(./config.yml):${opt:stage}.UPLOADS_BUCKET}
PolicyDocument:
Statement:
- Action:
- s3:putObject
Effect: "Allow"
Principal:
"AWS":
- "arn:aws:iam::#{AWS::AccountId}:root"
Resource:
- "arn:aws:s3:::${file(./config.yml):${opt:stage}.UPLOADS_BUCKET}/*.csv"
IceS3User:
Type: AWS::IAM::User
Properties:
Policies:
- PolicyName: IceS3Access
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- s3:ListBucket
- s3:PutObject
- s3:GetObject
- s3:GetObjectVersion
Resource:
- Fn::Join:
- ''
- - 'arn:aws:s3:::'
- Ref: S3BucketCsv
- Fn::Join:
- ''
- - 'arn:aws:s3:::'
- Ref: S3BucketCsv
- "/*"
IceUserAccessKey:
DependsOn: IceS3User
Type: AWS::IAM::AccessKey
Properties:
UserName:
Ref: IceS3User
Outputs:
UserPoolId:
Value:
Ref: UserPool
Export:
Name: "UserPool::Id"
UserPoolClientId:
Value:
Ref: UserPoolClient
Export:
Name: "UserPoolClient::Id"
IdentityPoolId:
Value:
Ref: IdentityPool
Export:
Name: "IdentityPool::Id"
AccessKeyID:
Value:
Ref: IceUserAccessKey
AccessKeySecret:
Value: {"Fn::GetAtt": ["IceUserAccessKey", "SecretAccessKey"]}
basically, i want to create the user who has access to the CSVBucket
and output the AccessKeySecret
but when i deploy the functions, i get only details this:
Serverless: Removing old service artifacts from S3...
Received Stack Output { DomainName: '*****.cloudfront.net',
HostedZoneId: '****',
StatusLambdaFunctionQualifiedArn: 'arn:aws:lambda:eu-west-1:[****]:function:api-prod-status:14',
CronLambdaFunctionQualifiedArn: 'arn:aws:lambda:eu-west-1:[****]:function:api-prod-cron:18',
ServerlessDeploymentBucketName: 'api-prod-serverlessdeploymentbucket-****',
NewgroupLambdaFunctionQualifiedArn: 'arn:aws:lambda:eu-west-1:[****]:function:api-prod-newgroup:10',
NotificationLambdaFunctionQualifiedArn: 'arn:aws:lambda:eu-west-1:[****]:function:api-prod-notification:18',
UserLambdaFunctionQualifiedArn: 'arn:aws:lambda:eu-west-1:[****]:function:api-prod-user:16',
ServiceEndpoint: 'https://********.execute-api.eu-west-1.amazonaws.com/prod',
InitLambdaFunctionQualifiedArn: 'arn:aws:lambda:eu-west-1:[****]:function:api-prod-init:12' }
any advice is much appreciated