Next Page: 10000

          Recreate AWS Resource with same name that was deleted      Cache   Translate Page      

@ajwalters wrote:

Apologies if this is more of an AWS/CloudFormation issue that SLS, but thought somebody might be able to provide some insight.

In my SLS config, I define a Elasticache cluster resource and provide a ClusterName. Because i’m in development, I want to delete the Elasticache cluster when i’m done so as not to incur unnecessary charges. However, when I perform subsequent deploys, the Elasticache cluster is not created and the deploy succeeds. I was wondering if there was a flag or setting needed to force recreation of the Elasticache cluster if it it was deleted

Thanks,
Adam

Posts: 1

Participants: 1

Read full topic


          ${file(...)} stoped to work      Cache   Translate Page      

@eduardoferrari wrote:

Hello guys, I have a gitlab-runner to deploy my projects on AWS and for some reason the command “${file(…)}” is not working into the runner… I’m getting this error message form AWS about the CloudFormation in wrong format:

undefined resource {file(config.{self:provider.stage}.json):iamRole}

I have 3 files:

  • confg.dev-test.json
  • confg.pre-prod.json
  • confg.prod.json
    All of than have the iamRole property with the correct ARN for environment.

It is working normally locally to deploy, but not on the runner.

The full line on the serverless.yml is:
role: {file(config.{self:provider.stage}.json):iamRole}

And I’m getting the correct stage, because I’m using it in order places on the same file… and I checked also, the file exists during the runner execution.

Tks a lot for help me.

Posts: 1

Participants: 1

Read full topic


          Deploy serverless behind a proxy      Cache   Translate Page      

@tomad01 wrote:

Hello!

How can I do “sls deploy” using a proxy ?

Posts: 1

Participants: 1

Read full topic


          Pass variables within nested resources      Cache   Translate Page      

@khinester wrote:

hello,
i have the following folder / file structure

 khinester@pc   master ● ? ⍟3  tree -L 2                                       ✔  6650  12:06:19
.

├── config.yml
├── config.yml.example
├── package.json
├── package-lock.json
├── README.md
├── resources
│   ├── cdn.yml
│   ├── codecommit.yml
│   ├── ecr.yml
│   └── s3.yml
├── serverless.yml

my s3.yml looks like:

Resources:
  UploadsBucketCsv:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: ${file(../../config.yml):${opt:stage}.UPLOADS_BUCKET}

and within my serverless.yml, i have:

resources:
  - ${file(resources/s3.yml)}

but when i run my deploy, i get the following:

 Serverless Warning --------------------------------------

  A valid file to satisfy the declaration 'file(../../config.yml):prod.UPLOADS_BUCKET' could not be found.

what is the correct way to reference variables from within nested yml files?

any advice is much appreciated.

Posts: 1

Participants: 1

Read full topic


          Enable CORS does not add Access-Control-Allow-Origin header to any method under resource, except OPTION      Cache   Translate Page      

@casper-gh wrote:

Hi,

I’m having a hard time adding Access-Control-Allow-Origin to my GET method with serverless. When I enabled CORS on resource root, I expect all of my methods will have Access-Control-Allow-Origin header under Method Response. This usually happens when I enable CORS from API GW dashboard.

Additional info: For API created by serverless, enabling CORS via Console would also fail for any of my method due to missing a response body:

This is created automatically if you create new method manually from console, however serverless doesn’t create it.

Update: here’s the API config from serverless.yml

  - http:
      path: /myapi
      method: GET
      cors: true

This creates an OPTION method with CORS enabled, but nothing gets created on GET method.

Posts: 8

Participants: 2

Read full topic


          Is serverless supporting all native cloudformation keywords and functions?      Cache   Translate Page      

@jinesh90 wrote:

Basic Question:

Is serverless support all cloudformation keywords? like !Ref, !Equals etc, what i found is these keywords need to explicitly mentioned like Fn::Ref , Fn::Equals etc.

Thanks,
Jinesh

Posts: 1

Participants: 1

Read full topic


          Access Denied when calling the S3 PutObject operation      Cache   Translate Page      

@rlr0329 wrote:

I am using serverless framework 1.36.3. In my AWS serverless function, I am getting the following error:

An error occurred (AccessDenied) when calling the PutObject operation: Access Denied

Here is the Python3 code snippet:

tmpfilename='/tmp/'+filename
csvfile=open(tmpfilename,'w')
writer = csv.DictWriter(csvfile, fieldnames=fieldnames,quotechar='"')
writer.writeheader()
for row in data:
    csvrow={}
    for f in fieldnames:
        csvrow[f]=getFieldValue(row[f])
    writer.writerow(csvrow)
csvfile.close()

myObj=s3.Object(myBucket, filename)
s3response=myObj.put(Body=open(tmpfilename, 'rb'))

I verified that the csvfile is getting created and populated with data

This is what is generated in the IAM inline policy for the lambda role:

    {
        "Action": [
            "s3:*"
        ],
        "Resource": [
            "arn:aws:s3:::myBucket"
        ],
        "Effect": "Allow"
    }

Posts: 2

Participants: 1

Read full topic


          AWS IAM Authorization for AWS::Serverless::Function for Api Event Type      Cache   Translate Page      

@karthikprom wrote:

We are currently using API Keys to secure access to our API Gateway. However, we are moving to an IAM model with access/secret key. I understand that swagger does not allow us to do this (we currently have api_key set in swagger to enable API Key authentication).

I have created the policy needed for the various operations as:

  SvcAccountPolicy:
    Type: AWS::IAM::ManagedPolicy
    Properties:
      ManagedPolicyName: !Sub 'iam-${EnvTag}'
      PolicyDocument:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Action:
              - 'execute-api:Invoke'
            Resource:
              - !Sub 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${SomeApi}/*/GET/*'
              - !Sub 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${SomeApi}/*/POST/*'
              - !Sub 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${SomeApi}/*/PUT/*'
              - !Sub 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:${SomeApi}/*/DELETE/*'
      Users:
        - !Ref userSvcAcct

My lambda function is shown below. I am still new to cloud formation, and would love some help on what I can do to add a lambda authorizer to this ( I believe it will be in the Events->ApiPost/Get etc section), that would allow me to use secret/access key.

  FtpUserMgmtLambda:
    Type: AWS::Serverless::Function
    Properties:
      Description: Lambda handler function for FTP user management
      Handler: 'handler.UserManagementHandler::handleRequest'
      Runtime: java8
      MemorySize: 512
      Timeout: 300
      FunctionName: !Ref LambdaFunctionName
      Role: !GetAtt UserMgmtLambdaRole.Arn
      CodeUri:
        Bucket: !Ref LambdaCodeS3Bucket
        Key: !Ref LambdaCodeFileName
      VpcConfig:
        SomeConfig stuff here
      Environment:
        Variables:
          dbPort: !Ref UserStoreDbPort
          dbUser: !Ref UserStoreDbUserId
          dbName: !Ref UserStoreDbName
          environment: !Ref EnvTag
          basepath: 'somepath'
      Events:
        ApiPost:
          Type: Api
          Properties:
            RestApiId: !Ref SomeApi
            Path: /path
            Method: POST
            Auth: <<Dont know what to do here! HELP>>
        ApiGet:
          Type: Api
          Properties:
            RestApiId: !Ref SomeApi
            Path: /path
            Method: GET
            Auth: *<<Dont know what to do here! HELP>>*
      Tags:
        Name: !Ref LambdaFunctionName
        function: lambda function that manages ftp users

I looked at https://forum.serverless.com/t/solved-api-gateway-how-to-set-authorization-in-method-request-to-aws-iam/ but don’t think it solves my conundrum. If it does, I am unsure how to apply. Appreciate any help…

Thank you
Karthik

Posts: 1

Participants: 1

Read full topic


          Granting permission for scheduled event to access dynamoDB      Cache   Translate Page      

@powderham wrote:

I am trying to run a scheduled event that reads from a database and then posts to an external api with the result of the database read. This all works fine locally however when I have deployed it, I come across the following error.

AccessDeniedException: 
User: arn:aws:sts::244665275099:assumed-role/holibobs-prod-us-east-1-lambdaRole/holibobs-prod-slack-notify-teams 
is not authorized to perform: dynamodb:BatchGetItem on resource: 
arn:aws:dynamodb:us-east-1:244665275099:table/prod-teams

From my research online it seems like I need to be giving access for this function to interract with dynamoDB.

Can someone point me in the right direction of what I should be doing here. None of my other lambdas that are invoked via api have this problem.

My Resources config is the below:

Resources:
  # The federated identity for our user pool to auth with
  CognitoIdentityPool:
    Type: AWS::Cognito::IdentityPool
    Properties:
      # Generate a name based on the stage
      IdentityPoolName: ${self:custom.stage}IdentityPool
      # Don't allow unathenticated users
      AllowUnauthenticatedIdentities: false
      # Link to our User Pool
      CognitoIdentityProviders:
        - ClientId:
            Ref: CognitoUserPoolClient
          ProviderName:
            Fn::GetAtt: [ "CognitoUserPool", "ProviderName" ]
            
  # IAM roles
  CognitoIdentityPoolRoles:
    Type: AWS::Cognito::IdentityPoolRoleAttachment
    Properties:
      IdentityPoolId:
        Ref: CognitoIdentityPool
      Roles:
        authenticated:
          Fn::GetAtt: [CognitoAuthRole, Arn]
          
  # IAM role used for authenticated users
  CognitoAuthRole:
    Type: AWS::IAM::Role
    Properties:
      Path: /
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: 'Allow'
            Principal:
              Federated: 'cognito-identity.amazonaws.com'
            Action:
              - 'sts:AssumeRoleWithWebIdentity'
            Condition:
              StringEquals:
                'cognito-identity.amazonaws.com:aud':
                  Ref: CognitoIdentityPool
              'ForAnyValue:StringLike':
                'cognito-identity.amazonaws.com:amr': authenticated
      Policies:
        - PolicyName: 'CognitoAuthorizedPolicy'
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
              - Effect: 'Allow'
                Action:
                  - 'mobileanalytics:PutEvents'
                  - 'cognito-sync:*'
                  - 'cognito-identity:*'
                Resource: '*'
              
              # Allow users to invoke our API
              - Effect: 'Allow'
                Action:
                  - 'execute-api:Invoke'
                Resource:
                  Fn::Join:
                    - ''
                    -
                      - 'arn:aws:execute-api:'
                      - Ref: AWS::Region
                      - ':'
                      - Ref: AWS::AccountId
                      - ':'
                      - Ref: ApiGatewayRestApi
                      - '/*'

Posts: 1

Participants: 1

Read full topic


          Building a serverless real-time chat application with AWS AppSync      Cache   Translate Page      
Hello , I would like to build chat system and integrate it my my existing social media website using amazon APPSync. please bind only if you have work in such project . Thanks (Budget: $2 - $8 USD, Jobs: Amazon Web Services, Javascript, MySQL, PHP)
          Software Development Engineer - Amazon.com Services, Inc. - Seattle, WA      Cache   Translate Page      
You are empowered to bring new technologies including serverless compute and machine learning to your solutions....
From Amazon.com - Sat, 02 Feb 2019 10:11:03 GMT - View all Seattle, WA jobs
          Technical Architect - AWS - CDW - Seattle, WA      Cache   Translate Page      
DevOps, Big Data, Machine Learning, Serverless computing etc. Solicit input/feedback from both internal and external customers to shape the service offering....
From CDW - Sun, 30 Dec 2018 02:07:17 GMT - View all Seattle, WA jobs
          Technical Architect - AWS - CDW - Dallas, TX      Cache   Translate Page      
DevOps, Big Data, Machine Learning, Serverless computing etc. Solicit input/feedback from both internal and external customers to shape the service offering....
From CDW - Sun, 30 Dec 2018 02:07:17 GMT - View all Dallas, TX jobs


Next Page: 10000

Site Map 2018_01_14
Site Map 2018_01_15
Site Map 2018_01_16
Site Map 2018_01_17
Site Map 2018_01_18
Site Map 2018_01_19
Site Map 2018_01_20
Site Map 2018_01_21
Site Map 2018_01_22
Site Map 2018_01_23
Site Map 2018_01_24
Site Map 2018_01_25
Site Map 2018_01_26
Site Map 2018_01_27
Site Map 2018_01_28
Site Map 2018_01_29
Site Map 2018_01_30
Site Map 2018_01_31
Site Map 2018_02_01
Site Map 2018_02_02
Site Map 2018_02_03
Site Map 2018_02_04
Site Map 2018_02_05
Site Map 2018_02_06
Site Map 2018_02_07
Site Map 2018_02_08
Site Map 2018_02_09
Site Map 2018_02_10
Site Map 2018_02_11
Site Map 2018_02_12
Site Map 2018_02_13
Site Map 2018_02_14
Site Map 2018_02_15
Site Map 2018_02_15
Site Map 2018_02_16
Site Map 2018_02_17
Site Map 2018_02_18
Site Map 2018_02_19
Site Map 2018_02_20
Site Map 2018_02_21
Site Map 2018_02_22
Site Map 2018_02_23
Site Map 2018_02_24
Site Map 2018_02_25
Site Map 2018_02_26
Site Map 2018_02_27
Site Map 2018_02_28
Site Map 2018_03_01
Site Map 2018_03_02
Site Map 2018_03_03
Site Map 2018_03_04
Site Map 2018_03_05
Site Map 2018_03_06
Site Map 2018_03_07
Site Map 2018_03_08
Site Map 2018_03_09
Site Map 2018_03_10
Site Map 2018_03_11
Site Map 2018_03_12
Site Map 2018_03_13
Site Map 2018_03_14
Site Map 2018_03_15
Site Map 2018_03_16
Site Map 2018_03_17
Site Map 2018_03_18
Site Map 2018_03_19
Site Map 2018_03_20
Site Map 2018_03_21
Site Map 2018_03_22
Site Map 2018_03_23
Site Map 2018_03_24
Site Map 2018_03_25
Site Map 2018_03_26
Site Map 2018_03_27
Site Map 2018_03_28
Site Map 2018_03_29
Site Map 2018_03_30
Site Map 2018_03_31
Site Map 2018_04_01
Site Map 2018_04_02
Site Map 2018_04_03
Site Map 2018_04_04
Site Map 2018_04_05
Site Map 2018_04_06
Site Map 2018_04_07
Site Map 2018_04_08
Site Map 2018_04_09
Site Map 2018_04_10
Site Map 2018_04_11
Site Map 2018_04_12
Site Map 2018_04_13
Site Map 2018_04_14
Site Map 2018_04_15
Site Map 2018_04_16
Site Map 2018_04_17
Site Map 2018_04_18
Site Map 2018_04_19
Site Map 2018_04_20
Site Map 2018_04_21
Site Map 2018_04_22
Site Map 2018_04_23
Site Map 2018_04_24
Site Map 2018_04_25
Site Map 2018_04_26
Site Map 2018_04_27
Site Map 2018_04_28
Site Map 2018_04_29
Site Map 2018_04_30
Site Map 2018_05_01
Site Map 2018_05_02
Site Map 2018_05_03
Site Map 2018_05_04
Site Map 2018_05_05
Site Map 2018_05_06
Site Map 2018_05_07
Site Map 2018_05_08
Site Map 2018_05_09
Site Map 2018_05_15
Site Map 2018_05_16
Site Map 2018_05_17
Site Map 2018_05_18
Site Map 2018_05_19
Site Map 2018_05_20
Site Map 2018_05_21
Site Map 2018_05_22
Site Map 2018_05_23
Site Map 2018_05_24
Site Map 2018_05_25
Site Map 2018_05_26
Site Map 2018_05_27
Site Map 2018_05_28
Site Map 2018_05_29
Site Map 2018_05_30
Site Map 2018_05_31
Site Map 2018_06_01
Site Map 2018_06_02
Site Map 2018_06_03
Site Map 2018_06_04
Site Map 2018_06_05
Site Map 2018_06_06
Site Map 2018_06_07
Site Map 2018_06_08
Site Map 2018_06_09
Site Map 2018_06_10
Site Map 2018_06_11
Site Map 2018_06_12
Site Map 2018_06_13
Site Map 2018_06_14
Site Map 2018_06_15
Site Map 2018_06_16
Site Map 2018_06_17
Site Map 2018_06_18
Site Map 2018_06_19
Site Map 2018_06_20
Site Map 2018_06_21
Site Map 2018_06_22
Site Map 2018_06_23
Site Map 2018_06_24
Site Map 2018_06_25
Site Map 2018_06_26
Site Map 2018_06_27
Site Map 2018_06_28
Site Map 2018_06_29
Site Map 2018_06_30
Site Map 2018_07_01
Site Map 2018_07_02
Site Map 2018_07_03
Site Map 2018_07_04
Site Map 2018_07_05
Site Map 2018_07_06
Site Map 2018_07_07
Site Map 2018_07_08
Site Map 2018_07_09
Site Map 2018_07_10
Site Map 2018_07_11
Site Map 2018_07_12
Site Map 2018_07_13
Site Map 2018_07_14
Site Map 2018_07_15
Site Map 2018_07_16
Site Map 2018_07_17
Site Map 2018_07_18
Site Map 2018_07_19
Site Map 2018_07_20
Site Map 2018_07_21
Site Map 2018_07_22
Site Map 2018_07_23
Site Map 2018_07_24
Site Map 2018_07_25
Site Map 2018_07_26
Site Map 2018_07_27
Site Map 2018_07_28
Site Map 2018_07_29
Site Map 2018_07_30
Site Map 2018_07_31
Site Map 2018_08_01
Site Map 2018_08_02
Site Map 2018_08_03
Site Map 2018_08_04
Site Map 2018_08_05
Site Map 2018_08_06
Site Map 2018_08_07
Site Map 2018_08_08
Site Map 2018_08_09
Site Map 2018_08_10
Site Map 2018_08_11
Site Map 2018_08_12
Site Map 2018_08_13
Site Map 2018_08_15
Site Map 2018_08_16
Site Map 2018_08_17
Site Map 2018_08_18
Site Map 2018_08_19
Site Map 2018_08_20
Site Map 2018_08_21
Site Map 2018_08_22
Site Map 2018_08_23
Site Map 2018_08_24
Site Map 2018_08_25
Site Map 2018_08_26
Site Map 2018_08_27
Site Map 2018_08_28
Site Map 2018_08_29
Site Map 2018_08_30
Site Map 2018_08_31
Site Map 2018_09_01
Site Map 2018_09_02
Site Map 2018_09_03
Site Map 2018_09_04
Site Map 2018_09_05
Site Map 2018_09_06
Site Map 2018_09_07
Site Map 2018_09_08
Site Map 2018_09_09
Site Map 2018_09_10
Site Map 2018_09_11
Site Map 2018_09_12
Site Map 2018_09_13
Site Map 2018_09_14
Site Map 2018_09_15
Site Map 2018_09_16
Site Map 2018_09_17
Site Map 2018_09_18
Site Map 2018_09_19
Site Map 2018_09_20
Site Map 2018_09_21
Site Map 2018_09_23
Site Map 2018_09_24
Site Map 2018_09_25
Site Map 2018_09_26
Site Map 2018_09_27
Site Map 2018_09_28
Site Map 2018_09_29
Site Map 2018_09_30
Site Map 2018_10_01
Site Map 2018_10_02
Site Map 2018_10_03
Site Map 2018_10_04
Site Map 2018_10_05
Site Map 2018_10_06
Site Map 2018_10_07
Site Map 2018_10_08
Site Map 2018_10_09
Site Map 2018_10_10
Site Map 2018_10_11
Site Map 2018_10_12
Site Map 2018_10_13
Site Map 2018_10_14
Site Map 2018_10_15
Site Map 2018_10_16
Site Map 2018_10_17
Site Map 2018_10_18
Site Map 2018_10_19
Site Map 2018_10_20
Site Map 2018_10_21
Site Map 2018_10_22
Site Map 2018_10_23
Site Map 2018_10_24
Site Map 2018_10_25
Site Map 2018_10_26
Site Map 2018_10_27
Site Map 2018_10_28
Site Map 2018_10_29
Site Map 2018_10_30
Site Map 2018_10_31
Site Map 2018_11_01
Site Map 2018_11_02
Site Map 2018_11_03
Site Map 2018_11_04
Site Map 2018_11_05
Site Map 2018_11_06
Site Map 2018_11_07
Site Map 2018_11_08
Site Map 2018_11_09
Site Map 2018_11_10
Site Map 2018_11_11
Site Map 2018_11_12
Site Map 2018_11_13
Site Map 2018_11_14
Site Map 2018_11_15
Site Map 2018_11_16
Site Map 2018_11_17
Site Map 2018_11_18
Site Map 2018_11_19
Site Map 2018_11_20
Site Map 2018_11_21
Site Map 2018_11_22
Site Map 2018_11_23
Site Map 2018_11_24
Site Map 2018_11_25
Site Map 2018_11_26
Site Map 2018_11_27
Site Map 2018_11_28
Site Map 2018_11_29
Site Map 2018_11_30
Site Map 2018_12_01
Site Map 2018_12_02
Site Map 2018_12_03
Site Map 2018_12_04
Site Map 2018_12_05
Site Map 2018_12_06
Site Map 2018_12_07
Site Map 2018_12_08
Site Map 2018_12_09
Site Map 2018_12_10
Site Map 2018_12_11
Site Map 2018_12_12
Site Map 2018_12_13
Site Map 2018_12_14
Site Map 2018_12_15
Site Map 2018_12_16
Site Map 2018_12_17
Site Map 2018_12_18
Site Map 2018_12_19
Site Map 2018_12_20
Site Map 2018_12_21
Site Map 2018_12_22
Site Map 2018_12_23
Site Map 2018_12_24
Site Map 2018_12_25
Site Map 2018_12_26
Site Map 2018_12_27
Site Map 2018_12_28
Site Map 2018_12_29
Site Map 2018_12_30
Site Map 2018_12_31
Site Map 2019_01_01
Site Map 2019_01_02
Site Map 2019_01_03
Site Map 2019_01_04
Site Map 2019_01_06
Site Map 2019_01_07
Site Map 2019_01_08
Site Map 2019_01_09
Site Map 2019_01_11
Site Map 2019_01_12
Site Map 2019_01_13
Site Map 2019_01_14
Site Map 2019_01_15
Site Map 2019_01_16
Site Map 2019_01_17
Site Map 2019_01_18
Site Map 2019_01_19
Site Map 2019_01_20
Site Map 2019_01_21
Site Map 2019_01_22
Site Map 2019_01_23
Site Map 2019_01_24
Site Map 2019_01_25
Site Map 2019_01_26
Site Map 2019_01_27
Site Map 2019_01_28
Site Map 2019_01_29
Site Map 2019_01_30
Site Map 2019_01_31
Site Map 2019_02_01
Site Map 2019_02_02
Site Map 2019_02_03
Site Map 2019_02_04
Site Map 2019_02_05
Site Map 2019_02_06
Site Map 2019_02_07
Site Map 2019_02_08
Site Map 2019_02_09
Site Map 2019_02_10