text:
strange / wrong bucket name in s3 policy in authRole

Before opening, please confirm:

[X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
[X] I have removed any sensitive information from my code snippets and submission.

How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
14.16.1
Amplify CLI Version
7.6.21
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
not that I'm aware of O:-)
Amplify Categories
storage
Amplify Commands
Not applicable
Describe the bug
I am migrating from amplify-cli 6.4.* to the latest, and I just realised that the s3 related policies in authRole contain the wrong bucket name. The amplify environment is rendered in twice, in a particular weird way:
{
    "Version": "2012-10-17",
    "Statement": {
        "Action": [
            "s3:PutObject",
            "s3:GetObject",
            "s3:DeleteObject"
        ],
        "Resource": [
            "arn:aws:s3:::solinger-sportbund-images-bucketdev-dev/protected/${cognito-identity.amazonaws.com:sub}/*"
        ],
        "Effect": "Allow"
    }
}

cli-inputs.json: (specifies correct bucketName)
{
  "resourceName": "AmplifySolingerSportbundImagesRN",
  "bucketName": "solinger-sportbund-images-bucket",
  "policyUUID": "f330379c",
  "storageAccess": "authAndGuest",
  "guestAccess": [
    "READ"
  ],
  "authAccess": [
    "CREATE_AND_UPDATE",
    "READ",
    "DELETE"
  ]
}

local-env-info.json: (constains envName)
{
  "projectPath": "/Users/aek/dev/ssbsg/solinger-sportbund-api",
  "defaultEditor": "vscode",
  "envName": "dev"
}

amplify-meta.json: (contains wrong bucket name in output)
  "storage": {
    "AmplifySolingerSportbundImagesRN": {
      "service": "S3",
      "providerPlugin": "awscloudformation",
      "dependsOn": [],
      "output": {
        "BucketName": "solinger-sportbund-images-bucketdev-dev",
        "Region": "eu-central-1"
      },
      "lastPushTimeStamp": "2022-02-25T12:16:48.966Z",
      "providerMetadata": {
        "s3TemplateURL": "https://s3.amazonaws.com/amplify-solinger-v1-dev-20190523135333-deployment/amplify-cfn-templates/storage/cloudformation-template.json",
        "logicalId": "storageAmplifySolingerSportbundImagesRN"
      },
      "lastPushDirHash": "eGT60r2X8AS6C+FfYZ2Gk9JBHZE="
    }
  },

Expected behavior
The resource should be:
arn:aws:s3:::solinger-sportbund-images-bucket-dev/protected/${cognito-identity.amazonaws.com:sub}/*

Reproduction steps

not sure - I assume a new project doesn't show this behaviour, but reproducing it with a legacy project might be difficult?

GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line

Additional information
No response

So this appears to be the part that is producing the wrong value:
        "BucketName": {
          "Fn::If": [
            "ShouldNotCreateEnvResources",
            {
              "Ref": "bucketName"
            },
            {
              "Fn::Join": [
                "",
                [
                  {
                    "Ref": "bucketName"
                  },
                  {
                    "Fn::Select": [
                      3,
                      {
                        "Fn::Split": [
                          "-",
                          {
                            "Ref": "AWS::StackName"
                          }
                        ]
                      }
                    ]
                  },
                  "-",
                  {
                    "Ref": "env"
                  }
                ]
              ]
            }
          ]
        },
       ```

It joins these parts to the BucketName:

1. The `bucketName`
2. The 4th element of `AWS::StackName`
3. "-"
4. The environmant name

1. resolves to solinger-sportbund-images-bucket
2. the root stack is called amplify-solinger-v1-dev-20190523135333, if this is split by '-' the 4th element (3 with zero index) is indeed 'dev'
3. '-'
4. the environement is 'dev'

So this resolves in solinger-sportbund-images-bucketdev-dev - but that's not what the bucket is called. Well … it actually has been created unintentionally!
<img width="1288" alt="image" src="https://user-images.githubusercontent.com/1392994/155732603-0839f9a3-d6a4-41af-bcfe-bbbc5e738e0d.png">

The question is now - how do I fix that?

So, it looks like the naming pattern was introduced in https://github.com/aws-amplify/amplify-cli/pull/2709/files#diff-3b211d52016482ec677f83b3c045e3791847b9f9fec3c2e25974e5a712c43c7f
Our amplify project is older.
Any idea how to fix our setup? Since the product is in production, re-creating the s3 bucket is not an option. otoh, I don't know how to force the BucketName to the old naming pattern.

Sorry for all the comments, but while waiting on an answer I still tried to understand the situation better.
I tried this in override.ts:
import { AmplifyS3ResourceTemplate } from '@aws-amplify/cli-extensibility-helper';

// AmplifyS3ResourceTemplate | see https://github.com/aws-amplify/amplify-cli/issues/9063#issuecomment-1034426494
export function override(resources: any) {
    resources.s3Bucket.bucketName = {
        "Fn::If": [
          "ShouldNotCreateEnvResources",
          {
            "Ref": "bucketName"
          },
          {
            "Fn::Join": [
              "",
              [
                {
                  "Ref": "bucketName"
                },
                "-",
                {
                  "Ref": "env"
                }
              ]
            ]
          }
        ]
      }
    resources.s3AuthProtectedPolicy.policyDocument.Statement.Action =
        ["s3:PutObject","s3:GetObject","s3:DeleteObject","s3:PutObjectAcl"]
}

but when trying to push this, CloudFormation complains that the bucket already exists. Where is the decision made to recreate the resource?
UPDATE_IN_PROGRESS          S3Bucket                                                                                AWS::S3::Bucket            Fri Feb 25 2022 17:19:33 GMT+0100 (Mitteleuropäische Normalzeit) Requested update requires the creation of a new physical resource; hence creating one.
UPDATE_FAILED               S3Bucket                                                                                AWS::S3::Bucket            Fri Feb 25 2022 17:19:33 GMT+0100 (Mitteleuropäische Normalzeit) solinger-sportbund-images-bucket-dev already exists
UPDATE_ROLLBACK_IN_PROGRESS amplify-solinger-v1-dev-20190523135333-storageAmplifySolingerSportbundImagesRN-1LU637KOZH4RX AWS::CloudFormation::Stack Fri Feb 25 2022 17:19:34 GMT+0100 (Mitteleuropäische Normalzeit) The following resource(s) failed to update: [S3Bucket].
⠧ Updating resources in the cloud. This may take a few minutes...

UPDATE_FAILED storageAmplifySolingerSportbundImagesRN AWS::CloudFormation::Stack Fri Feb 25 2022 17:19:35 GMT+0100 (Mitteleuropäische Normalzeit) Embedded stack arn:aws:cloudformation:eu-central-1:498438122852:stack/amplify-solinger-v1-dev-20190523135333-storageAmplifySolingerSportbundImagesRN-1LU637KOZH4RX/dcf19180-7d52-11e9-8dab-06537af0a09a was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [S3Bucket].

It seems like there have been others with this issue (sorry again, that I didn't find the issue earlier): https://github.com/aws-amplify/amplify-cli/issues/8893#issuecomment-973029867
The resolution there however is to stay with the "new" bucket name and move/copy the contents over.
@ray415 & @kaustavghosh06 When I search for "AWS::StackName" in my project I find that's all over the place, and I fear that this issue might hit me in other places, that I have not realized yet. Do you have any recommendations for me? Thanks a lot!

I copied the files from the bucket to another one and then deleted the initial bucket. After a push, the bucket was recreated and I copied the files back. You can probably test it with another test-environment first.

Do you have any recommendations for me?

Migrate away from Amplify. I do not even dare to upgrade the Amplify version anymore because every time I do so it breaks something and this is not acceptable for the production environments to wait the fix for two weeks .

I managed to get the situation resolved by removing and re-attaching the bucket via cloudformation resource imports. However, it was a bit nerve wrecking, I have to admin.
@ray415 I am indeed considering the same. Today, I learned about amplify status -v which tells you, which resources will be deleted. As fragile as amplify is, this will at least help to gauge the risk before doing the actual push.

Hello @AndreasEK, Tired to replicate the issue in amplify application by migrating from 6.4.0 to the latest but did not run into the issue.
Following up to see if you are facing any issues in the latest CLI version.

Hi @ykethan - as commented in https://github.com/aws-amplify/amplify-cli/issues/9858#issuecomment-1057126673 I was able to resolve the situation for my setup. After that I was just happy that it worked for me and have not investigated further.

Hey @AndreasEK, glad to hear that you are up and running. Closing the issue, please do reach out to us again.

but when trying to push this, CloudFormation complains that the bucket already exists. Where is the decision made to recreate the resource?

Faced the same issue. After finally realizing the cause was the bucket name changed and implementing your override script to revert it, I encountered the same Already Exists error. Rather than trying to tell Amplify to skip creation, I tried just deleting the old bucket using the AWS Console and that worked! (see steps below if useful) So while perhaps a little scary, it actually only took a couple minutes to resolve. No update to client interfaces or integrations required.
Exact Steps:

Implement override script
a. amplify override storage -> paste @AndreasEK 's script into override.ts
Go to AWS Console and Create a temporary bucket
Copy all objects from old bucket to temp bucket
a. Using AWS CLI, run command: aws s3 sync s3://<OLD BUCKET NAME> s3://<TEMPORARY BUCKET NAME>
In AWS Console, delete the old bucket
a. Will need to remove all objects first, but console walks you through this pretty well.
Then run amplify push - should no longer have the Already Exists error
Copy all files back to the new [old] bucket using  aws s3 sync  s3://<TEMPORARY BUCKET NAME> s3://<OLD BUCKET NAME>

authors: AndreasEK irothenbaum ray415 ykethan


text:
fix: e2e failures

remove unnecessary carriage return calls
storage suite and add pinpoint test all pass locally
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Codecov Report

Merging #3856 into master will increase coverage by 0.42%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3856      +/-   ##
==========================================
+ Coverage   59.11%   59.53%   +0.42%
==========================================
  Files         310      303       -7
  Lines       14002    13903      -99
  Branches     2640     2784     +144
==========================================
  Hits         8277     8277
+ Misses       5310     5188     -122
- Partials      415      438      +23

Impacted Files
Coverage Δ

packages/amplify-util-mock/src/api/api.ts
0.00% <0.00%> (ø)

packages/graphql-mapping-template/src/print.ts
35.71% <0.00%> (ø)

packages/amplify-util-mock/src/storage/storage.ts
0.00% <0.00%> (ø)

...kages/amplify-util-mock/src/__e2e__/utils/index.ts
0.00% <0.00%> (ø)

...ages/amplify-appsync-simulator/src/server/index.ts
64.28% <0.00%> (ø)

...ges/amplify-util-mock/src/CFNParser/stack/index.ts
88.09% <0.00%> (ø)

...ges/graphql-transformer-core/src/util/fileUtils.ts
11.76% <0.00%> (ø)

...es/amplify-util-mock/src/api/resolver-overrides.ts
0.00% <0.00%> (ø)

...es/graphql-transformer-core/src/stripDirectives.ts
35.29% <0.00%> (ø)

.../amplify-util-mock/src/utils/lambda/loadMinimal.ts
0.00% <0.00%> (ø)

... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa712bd...7f31018. Read the comment docs.

source: gharchive/pull-request

authors: codecov-io edwardfoyle

repo: aws-amplify/amplify-cli

license_type: permissive

license_source: github-api


text:
Not pulling components because this project is not configured with the "react" framework prints before and after push

How did you install the Amplify CLI?
pnpm
If applicable, what version of Node.js are you using?
18
Amplify CLI Version
11.0.0-beta.7
What operating system are you using?
mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
n/a
Describe the bug
The message in the title and noted below appears both before and after push, which is a small Amplify project without Studio enabled
Not pulling components because this project is not configured with the "react" framework.

full logs
➜  ay push --allow-destructive-graphql-schema-updates --yes --debug
Not pulling components because this project is not configured with the "react" framework.
⠏ Fetching updates to backend environment: dev from the cloud.Overrides functionality is not implemented for this category
⠴ Fetching updates to backend environment: dev from the cloud.
⚠  WARNING: Some types do not have authorization rules configured. That means all create, read, update, and delete operations are denied on these types:
	 - Todo2
Learn more about "@auth" authorization rules here: https://docs.amplify.aws/cli/graphql/authorization-rules
⠦ Fetching updates to backend environment: dev from the cloud.Be careful when using @auth directives on a field in a root type. @auth directives on field definitions use the source object to perform authorization logic and the source will be an empty object for fields on root types. Static group authorization should perform as expected.
⠧ Fetching updates to backend environment: dev from the cloud.✅ GraphQL schema compiled successfully.

Edit your schema at /Users/josef/Documents/projects/aws-amplify/reproductions/a1268/amplify/backend/api/a1268/schema.graphql or place .graphql files in a directory at /Users/josef/Documents/projects/aws-amplify/reproductions/a1268/amplify/backend/api/a1268/schema
Overrides functionality is not implemented for this category
✔ Successfully pulled backend environment dev from the cloud.
⠹ Building resource api/a1268
⚠  WARNING: Some types do not have authorization rules configured. That means all create, read, update, and delete operations are denied on these types:
	 - Todo2
Learn more about "@auth" authorization rules here: https://docs.amplify.aws/cli/graphql/authorization-rules
Be careful when using @auth directives on a field in a root type. @auth directives on field definitions use the source object to perform authorization logic and the source will be an empty object for fields on root types. Static group authorization should perform as expected.
⠸ Building resource api/a1268✅ GraphQL schema compiled successfully.

Edit your schema at /Users/josef/Documents/projects/aws-amplify/reproductions/a1268/amplify/backend/api/a1268/schema.graphql or place .graphql files in a directory at /Users/josef/Documents/projects/aws-amplify/reproductions/a1268/amplify/backend/api/a1268/schema

    Current Environment: dev

┌──────────┬────────────────┬───────────┬───────────────────┐
│ Category │ Resource name  │ Operation │ Provider plugin   │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Auth     │ a12682544f6a9  │ Create    │ awscloudformation │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Api      │ a1268          │ Update    │ awscloudformation │
├──────────┼────────────────┼───────────┼───────────────────┤
│ Hosting  │ amplifyhosting │ No Change │                   │
└──────────┴────────────────┴───────────┴───────────────────┘

⚠  WARNING: Some types do not have authorization rules configured. That means all create, read, update, and delete operations are denied on these types:
	 - Todo2
Learn more about "@auth" authorization rules here: https://docs.amplify.aws/cli/graphql/authorization-rules
Be careful when using @auth directives on a field in a root type. @auth directives on field definitions use the source object to perform authorization logic and the source will be an empty object for fields on root types. Static group authorization should perform as expected.
✅ GraphQL schema compiled successfully.

Edit your schema at /Users/josef/Documents/projects/aws-amplify/reproductions/a1268/amplify/backend/api/a1268/schema.graphql or place .graphql files in a directory at /Users/josef/Documents/projects/aws-amplify/reproductions/a1268/amplify/backend/api/a1268/schema
⠼ Building resource api/a1268
⚠  WARNING: Some types do not have authorization rules configured. That means all create, read, update, and delete operations are denied on these types:
	 - Todo2
Learn more about "@auth" authorization rules here: https://docs.amplify.aws/cli/graphql/authorization-rules
⠴ Building resource api/a1268Be careful when using @auth directives on a field in a root type. @auth directives on field definitions use the source object to perform authorization logic and the source will be an empty object for fields on root types. Static group authorization should perform as expected.
⠦ Building resource api/a1268✅ GraphQL schema compiled successfully.

Edit your schema at /Users/josef/Documents/projects/aws-amplify/reproductions/a1268/amplify/backend/api/a1268/schema.graphql or place .graphql files in a directory at /Users/josef/Documents/projects/aws-amplify/reproductions/a1268/amplify/backend/api/a1268/schema

Deployment completed.
Deploying root stack a1268 [ ====================-------------------- ] 2/4
	amplify-a1268-dev-155611       AWS::CloudFormation::Stack     UPDATE_COMPLETE_C
	autha12682544f6a9              AWS::CloudFormation::Stack     CREATE_COMPLETE
	apia1268                       AWS::CloudFormation::Stack     UPDATE_COMPLETE
Deployed api a1268 [ ======================================== ] 9/9
	GraphQLAPI                     AWS::AppSync::GraphQLApi       UPDATE_COMPLETE
	GraphQLAPITransformerSchema3C… AWS::AppSync::GraphQLSchema    UPDATE_COMPLETE
	GraphQLAPIDefaultApiKey215A6D… AWS::AppSync::ApiKey           UPDATE_COMPLETE
	QueryHelloDataResolverFnQuery… AWS::AppSync::FunctionConfigu… CREATE_COMPLETE
	Todo                           AWS::CloudFormation::Stack     UPDATE_COMPLETE
	QueryhelloResolver             AWS::AppSync::Resolver         CREATE_COMPLETE
	Todo2                          AWS::CloudFormation::Stack     UPDATE_IN_PROGRES
Deployed auth a12682544f6a9 [ ======================================== ] 10/10
	UserPool                       AWS::Cognito::UserPool         CREATE_COMPLETE
	UserPoolClient                 AWS::Cognito::UserPoolClient   CREATE_COMPLETE
	UserPoolClientWeb              AWS::Cognito::UserPoolClient   CREATE_COMPLETE
	UserPoolClientRole             AWS::IAM::Role                 CREATE_COMPLETE
	UserPoolClientLambda           AWS::Lambda::Function          CREATE_COMPLETE
	UserPoolClientLambdaPolicy     AWS::IAM::Policy               CREATE_COMPLETE
	UserPoolClientLogPolicy        AWS::IAM::Policy               CREATE_COMPLETE
	UserPoolClientInputs           Custom::LambdaCallout          CREATE_COMPLETE
	IdentityPool                   AWS::Cognito::IdentityPool     CREATE_COMPLETE
	IdentityPoolRoleMap            AWS::Cognito::IdentityPoolRol… CREATE_COMPLETE

Deployment state saved successfully.

GraphQL endpoint: https://mifc66khtzg7tcrmlio422kz2u.appsync-api.us-east-1.amazonaws.com/graphql
GraphQL API KEY: da2-54qsjoh6zbge3mfad4gypm34ta

GraphQL transformer version: 2

Not pulling components because this project is not configured with the "react" framework.

Expected behavior
this message does not print unless this project has Studio enabled or I am expecting to pull components (/attempt to).
Reproduction steps

create an Amplify project with amplify init -y
create a GraphQL API amplify add api > GraphQL
push with amplify push -y
push to git and add Hosting with amplify add hosting
let hosting build, run amplify pull
try to make a change in your schema and push

Project Identifier
6eb2e5ca4610f067a938060bf5ef796a
Log output

# Put your logs below this line

Additional information
No response
Before submitting, please confirm:

[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
[X] I have removed any sensitive information from my code snippets and submission.

This is coming from the util-uibuilder package in CLI https://github.com/aws-amplify/amplify-cli/blob/7dc9179e6e15e1a261bcb717ec0e777f6f3dd68c/packages/amplify-util-uibuilder/src/commands/utils/shouldRenderComponents.ts#L37-L40 but transferring to the codegen ui repo since the studio ui team probably owns whatever fix this requires.

This message only appears when debugging is enabled and is there on purpose. Component generation is opt-out, not opt-in. I'm going to close this since it works as intended.

source: gharchive/issue

authors: alharris-at cwoolum josefaidt

repo: aws-amplify/amplify-codegen-ui


text:
chore: add ds/api integration tests to github workflows

Issue #, if available:
Description of changes:
Each workflow will only run one DataStore test suite. We learned that adding more than one test suite to a workflow has caused a lot of friction when dealing with flaky tests. 1:1 test target to github workflow gives us the ability to disable an entire workflow from the Github Actions UI, reduce the time to success for one workflow, and also lets us iterate on the stability of the workflow much more easily.
API integration tests should be pretty stable, in the PR, we'll extend the existing API integration test workflow to include new test targets.
Existing Workflows:

DataStore Integration Tests ✅
DataStore Transformer V2 Tests ✅

New workflows being added in this PR:

DataStore Multi Auth Tests ✅
DataStore Auth Cognito Tests ✅
DataStore Auth IAM Tests ✅
DataStore CPK Tests ✅
DataStore Lazy Load Tests - ✅ but only runs on workflow dispatch (manually selecting branch from the workflow UI)

API Workflow improvements

API Integration Tests

AWSAPIPluginFunctionalTests ✅
AWSAPIPluginGraphQLUserPoolTests ❌⏸
AWSAPIPluginGraphQLIAMTests  ❌⏸
AWSAPIPluginGraphQLLambdaAuthTests ✅
AWSAPIPluginLazyLoadTests ✅⏸
AWSAPIPluginRESTUserPoolTests ❌⏸
AWSAPIPluginRESTIAMTests ❌⏸

✅ - passing and enabled
✅⏸ - passing and disabled
❌⏸ - failing and disabled
❌ - failing
Notes:

AWSAPIPluginRESTIAMTests is failing for the query paremeter issue and will be fixed, coming up next. (if: ${{ false }})

DS LazyLoading tests passes on the data-dev-preview branch, they are added here to make it easier to run on a specific branch later.

API LazyLoading tests passed on data-dev-preview branch, it is disabled, so when we run this in the future, we will remove if: ${{ false }}

Some known flaky tests we should address next up: DataStore Integration Tests and AWSAPIPluginFunctionalTests

Successful test runs:

DataStore Integration Tests test run  🏃
DataStore Transformer V2 Tests test run  ✅
DataStore Multi Auth Tests test run ✅
DataStore Auth Cognito Tests test run ✅
DataStore Auth IAM Tests test run ✅
DataStore CPK Tests test run ✅
DataStore Lazy Load Tests test run - ✅
API Integration Tests test run 🏃

Check points: (check or cross out if not relevant)

[x] Added new tests to cover change, if needed
[x] Build succeeds with all target using Swift Package Manager
[x] All unit tests pass
[x] All integration tests pass
[ ] Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
[ ] Documentation update for the change if required
[x] PR title conforms to conventional commit style
[ ] If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

API functional tests failure
✗ testListPostWithPredicate, XCTAssertEqual failed: ("0") is not equal to ("1")
✗ testListPostWithPredicate, failed - Should only have a single post with the unique title

repo: aws-amplify/amplify-swift


text:
Configuring exit codes with the parameter --non-zero-exit-code is not working

CloudFormation Lint Version
cfn-lint 0.66.1
What operating system are you using?
Ubuntu host and running cfn-lint in docker built from repo (docker build --tag cfn-python-lint:latest .)
Describe the bug
I have a template with an unused parameter. Running cfn-lint on the template gives the expected warning W2001 and the exit code is 4. However, when I used the parameter --non-zero-exit-code none or --non-zero-exit-code error, the exist code is still 4.
Expected behavior
According to the documentation, setting none or error should make the exit code 0.
Reproduction template
Template (template.yaml):
Parameters:
  UnusedParameter:
    Type: String
Resources:
  LogGroup:
    Type: AWS::Logs::LogGroup

Commands and output:
$ cfn-lint -t template.yaml
W2001 Parameter UnusedParameter not used.
template.yaml:2:3

$ echo $?
4
$ cfn-lint --non-zero-exit-code none -t template.yaml
W2001 Parameter UnusedParameter not used.
template.yaml:2:3

$ echo $?
4
$ cfn-lint --version
cfn-lint 0.66.1

You are using v0.66.1 can you upgrade... we just released v0.86.3 today.  My assumption is this has been resolved for a while.
(cfn-python-lint-wusv) ➜  cfn-python-lint git:(main) cfn-lint --non-zero-exit-code none -t local/issue/3136.yaml
W2001 Parameter UnusedParameter not used.
local/issue/3136.yaml:2:3

(cfn-python-lint-wusv) ➜  cfn-python-lint git:(main) echo $?
0

authors: JoseRolles kddejong

repo: aws-cloudformation/cfn-lint


text:
[ADDON] - CloudWatch Metrics

Add cloudwatch metrics as an add-on.

Closed in #427 - thanks @askulkarni2 🎉

repo: aws-ia/terraform-aws-eks-blueprints


text:
Enabling RAG makes it relatively easy to reach 400KB limit for a dynamodb item on sessions table

Amazon DynamoDB limits the size of each item in a table to 400 KB. It's feasible that this limit could be reached on the sessions table because of all the extra metadata stored in the item. Especially when running with RAG configured. The session table stores chat history in a single item attribute.
To work around this limitation, we can store chat history as individual items in the sessions table. I can submit a PR for this change if there is an interest in this issue.

Hi @gbone-restore ,
I agree it is an issue but changing the table structure might be a significant change.
A shorter/smaller change could be to reduce the metadata stored and limit the number of message in the sessions.

Here's the data model that I used to test out this change.

The partition key is now users and the sort key is sessions. And there are two types of items to make selecting session history and dealing with chat history a little easier. I can submit a PR with a working example. The bulk of the changes are in lib/shared/layers/python-sdk/python/genai_core/langchain/chat_message_history.py and lib/shared/layers/python-sdk/python/genai_core/sessions.py.

The partition key is now users and the sort key is sessions.
I think it's a good solution. My concern is it would invalidate existing sessions

I can submit a PR with a working example
If you already have a prototype available it would be welcome.

Note I intend to discuss this topic with the maintainers.

authors: charles-marion gbone-restore

repo: aws-samples/aws-genai-llm-chatbot


text:
I have followed every step correctly and reviewed the same , but i am not getting any report in my s3 bucket .

I have followed every step correctly and reviewed the same , but i am not getting any report in my s3 bucket .
There is no errors or issue that is been triggered, request you to assist us asap.

In this I have changed the LogArchive Account to one of my Member Account, where i created the S3 and would like to get the logs there.

repo: aws-samples/aws-iam-credential-report


text:
[Enhancement] Add support for new private NATGW’s

ASEA deploys NATGW
Add support for new private NATGW’s
“type”:  “private”, default: public, also means no ENI’s/public IPs

Does the VPC config need to be updated to support an array of NatGateways?


text:
What changes are required if the Gitlab URL is custom and requires tls certificate

I am using this code for setting up a scalable runner. My gitlab URL is not default and requires a certificate. I have managed to put certificate in the docker. Although the POST request throws a 400 error on hitting the endpoint. What changes does in this code could fix it?

Hello @jkjoshi1 ,
First you set the gitlab server in app.yml.
For the custom certificate, did you try to add them to the fargate driver that runs the gitlba runner service ?

repo: aws-samples/cdk-fargate-gitlab-runner


text:
merge_exclude_columns not working in iceberg incremental models

Describe the bug
The parameter merge_exclude_columns, which excludes the specified column from being updated with the merge strategy, seems to be ignored with iceberg tables.
Current behavior
The config below updates all the columns of the materialized table, including "created_at" column.
{{
    config(
        materialized='incremental',
        incremental_strategy='merge',
        unique_key='table_id',
        file_format= 'iceberg',
        merge_exclude_columns = ['created_at']
    )
}}

Expected behavior
The setting merge_exclude_columns='created_at' should avoid updating the created_at column.
Screenshots and log output
We don't get any error message, even when we specify in merge_exclude_columns a column that doesn't exist.
System information
The output of dbt --version:
Core:
  - installed: 1.8.6
  - latest:    1.8.6 - Up to date!

Plugins:
  - glue:   1.8.1 - Up to date!
  - spark:  1.8.0 - Up to date!

The operating system you're using:
Windows
The output of python --version:
Python 3.12.6
Additional context
Same issue with merge_update_columns.

I've been having this problem too. I've dug through the code and the offending function is located  here.
The iceberg upsert functionality in general needs building out but the actually buggy code is here whereby the current timestamp is added as an update timestamp BEFORE any comparisons are done between the source and the target data, causing the upsert string to always evaluate to not matched and insert new rows every time as the update timestamp column will always have a value in it that doesn't match any previously written rows.

authors: e-quili showell-nex

repo: aws-samples/dbt-glue


text:
feat(sample): text to sql sample app

Issue #, if available:
Description of changes:
The "Text To SQL" generative AI sample application is a cutting-edge solution that enables users to interact with databases through natural language queries, eliminating the need for extensive SQL knowledge. Underpinning this powerful application is the Generative AI CDK (aws-text-to-sql) construct, a robust framework developed by AWS to facilitate the seamless integration of generative AI capabilities into applications.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Could you please also add the link to this new sample in the main samples repo readme ? https://github.com/aws-samples/generative-ai-cdk-constructs-samples/tree/main?tab=readme-ov-file#getting-started

authors: dineshSajwan krokoko


text:
Model Training Pipeline - ValidationDataLocation Output Value incorrect

Describe the bug
In the model_training_pipeline.py, the ValidationDataLocation output is pointing to the training location, instead of the validation location. The description also mentions training data instead of validation data.
Snippet from model_training_pipeline.py
            self,
            id="ValidationDataLocation",
            value=f"https://s3.console.aws.amazon.com/s3/buckets/{self.assets_bucket_name.value_as_string}/{self.training_data.value_as_string}",
            description="Training data used by the training job",
        ).node.condition = self.validation_data_provided

To Reproduce
Run the provisionpipeline step with the pipeline_type = model_training_builtin and specify a training_data and validation_data field
Expected behavior
The ValidationDataLocation should show the validation file, not the training file.
Please complete the following information about the solution:

[v2.2.0] Version: [e.g. v1.0.0]

[us-east-2 ] Region: [e.g. us-east-1]

[no] Was the solution modified from the version published on this repository?

[no ] If the answer to the previous question was yes, are the changes available on GitHub?

[N/A ] Have you checked your service quotas for the sevices this solution uses?

Screenshots
Validation row should point to the validation.csv file

Additional context
Looks like a copy+paste bug.

Hello @zortx233 , thank you for submitting the bug. I will look into it. Thanks

I can confirm this is a bug and will be addressed in the next release. Thank you.
Closing this issue.


text:
fix needed for safari (RangeError: Invalid Date)

I could not get this to work on safari till I made this change.  I kept getting RangeError: Invalid Date when I tried to go cognitoSyncClient.openOrCreateDataset('MyDataset', function(err, dataset) {
Note
date = new Date(undefined) || new Date();
Invalid Date

date = undefined ? undefined : new Date();
Date 2015-02-08T01:30:22.012Z

now it works, and I'm syncing between all my browsers.

Thanks, we are reviewing this request.

Hi, can you confirm that we can use, modify, copy, and redistribute this PR? Thanks!

Likewise, in implementing this library I was able to use it fine in Chrome and my coworker received error after error in Safari stating "Range Error: Invalid Date"

Thanks @tingletech - I can confirm that this resolved my issue with Safari. Not sure why it hasn't been merged yet.

Yes you can use, modify, and redistribute the PR; technically it is
Copyright © 1995 UC Regents, all Rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

Neither the name of the {organization} nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

authors: mikemurry scottbyrns timbunch tingletech

repo: aws/amazon-cognito-js


text:
Use "/code " to highlight code samples in cmd examples

Sometimes we want the examples in the commands to not start with "$" (for example #229)
Start example code highlights with "/code " instead.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sometimes we want the examples in the commands to not start with "$" (for example #229)

Can you expand on what you mean by this? I'm not following.

Sometimes we want the examples in the commands to not start with "$" (for example #229)

Can you expand on what you mean by this? I'm not following.

I want to highlight this blurb in grey:
$ archer app package -n frontend -e test --output-dir ./frontend-infra
$ ls ./frontend-infra
frontend.stack.yml      frontend-test.config.yml

Sometimes we want the examples in the commands to not start with "$" (for example #229)

Can you expand on what you mean by this? I'm not following.

I want to highlight this blurb in grey:
$ archer app package -n frontend -e test --output-dir ./frontend-infra
$ ls ./frontend-infra
frontend.stack.yml      frontend-test.config.yml

Ah, I was confused because there was no net change with this PR, but that's because this example doesn't exist yet.
Should we use /grey  in that case as the trigger instead of /code ?

@sonofachamp I wanted to focus on what the color represents instead of writing the color explicitly.
If we ever decide to change the color from grey to magenta for example, then we'll need to update every command again to "/magenta".

Sounds good. frontend.stack.yml      frontend-test.config.yml seems like an exceptional case, but that's fine.

authors: efekarakus sonofachamp


text:
feat: Support Elastic Beanstalk backwards compatibility via the CLI

Note - The CI pipeline is not automatically run when trying to merge a PR into a staging branch. I manually triggered the aws-dotnet-deploy-ci CodeBuild job and it ran successfully (build 223).
Issue #, if available:
DOTNET-5510
Description of changes:
This PR supports the CLI workflow to deploy to an existing Elastic Beanstalk environment. It does not update server mode
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Also I noticed that this is not being merged to dev. Is that intentional?

Yes, this is intentional because I am merging my changes in a staging branch. I have also mentioned this in the PR description.

repo: aws/aws-dotnet-deploy


text:
Amazon lex Slots break

hi i have 2 slots type in lex one is Membership Number and 2nd is Pin. i wanted to know, in contact flow can we check Membership number from database before moving to second slot which is pin. mean if we enter wrong membership number it check first if it is wrong then ask me again to say membership number (means check each slots 1 by 1 from db). hope so you understand my question. Thanks

@marcomagdy

repo: aws/aws-lambda-go


text:
Update Readme file to install more build depedencies

The preinstall.sh script uses few more dependencies, should be added to ap-get install command.
I was using a different base image and faced issues.
Depdencies:

tar
gzip
autoconf
automake
libtool

I'm using node:12-buster-slim as the base image and had to add autoconf and libtools and still get errors trying to find Python?! They're after node-gyp.
I thought the point of this project was to enable the use of random base images in Lambda? As such you really can't assume much about the base image. This is a node-focused package so you can't really assume that Python is installed. What else is missing?

Probably add libkrb5-dev to that as well...that was required for my v2.0.0 install on Ubuntu 20.04

for ubuntu i have to install these deps:
build-essential
libexecs-dev
tar
gzip
autoconf
automake
libtool
cmake
libkrb5-dev

Thanks @venusdharan and @manishgkasera for the list. It worked for me.

@venusdharan @GaneshJayaram97 what Ubuntu image/version were you using?

20.04.6 LTS

authors: GaneshJayaram97 jeffmcaffer manishgkasera twistedpair venusdharan vincilbishop


text:
MultiplePartGetRequests

Hi
I need to do multiple part downloads from S3, but this seems not to be implemented in the TransferClient class.
Is there a specific reason for this or is it even possible with the cpp SDK?
thanks a lot.

This is not yet in the transfer client. You can do it directly with the S3 client for now. Also, we are more than happy to take a pull request if you beat us to it.

This would be a really good addition to the SDK. I deal with large files and having multipart capability will enable us to offer a much better downloader for our application

authors: JonathanHenson TechBeings mmustafa-hp

repo: aws/aws-sdk-cpp